use_memchr2.diff

Akinori MUSHA, 11/13/2012 03:12 PM

Download (419 Bytes)

View differences:

re.c (working copy)
126 126
    if (m > SIZEOF_VALUE)
127 127
	rb_bug("!!too long pattern string!!");
128 128

  
129
    if (!(y = memchr(y, *x, n - m + 1)))
130
	return -1;
131

  
129 132
    /* Prepare hash value */
130 133
    for (hx = *x++, hy = *y++; x < xe; ++x, ++y) {
131 134
	hx <<= CHAR_BIT;