diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-04 07:51:16 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-04 07:51:16 +0000 |
commit | 6badf4e4f67803b60cbcff7c9d92b19eaa0c3e22 (patch) | |
tree | b786e4d5880a550d3b2284f4a52d1c353e13c980 /re.c | |
parent | 585e4cbbe2440065133f4d9b6174bd60567f18fb (diff) | |
download | ruby-6badf4e4f67803b60cbcff7c9d92b19eaa0c3e22.tar.gz |
ULL suffix is a C99ism
... and why not just use ~0 instead?
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r-- | re.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -105,13 +105,7 @@ rb_memsearch_ss(const unsigned char *xs, long m, const unsigned char *ys, long n { const unsigned char *x = xs, *xe = xs + m; const unsigned char *y = ys, *ye = ys + n; -#ifndef VALUE_MAX -# if SIZEOF_VALUE == 8 -# define VALUE_MAX 0xFFFFFFFFFFFFFFFFULL -# elif SIZEOF_VALUE == 4 -# define VALUE_MAX 0xFFFFFFFFUL -# endif -#endif +#define VALUE_MAX ((VALUE)~(VALUE)0) VALUE hx, hy, mask = VALUE_MAX >> ((SIZEOF_VALUE - m) * CHAR_BIT); if (m > SIZEOF_VALUE) |