diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-15 13:31:28 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-15 13:31:28 +0000 |
commit | 1e726cc87f051b40c779ab90df30fdc09aa2675b (patch) | |
tree | 3ee47591c30d905c0bd480935e726272ce626882 | |
parent | 840a5b482aa275f1664e637ffcd4768fe20af7b8 (diff) |
merge revision(s) 16239:
* re.c (rb_reg_search): use local variable. a patch from wanabe
<s.wanabe AT gmail.com> in [ruby-dev:34537]. [ruby-dev:34492]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@17264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | re.c | 5 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 9 insertions, 3 deletions
@@ -1,3 +1,8 @@ +Sun Jun 15 22:30:30 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * re.c (rb_reg_search): use local variable. a patch from wanabe + <s.wanabe AT gmail.com> in [ruby-dev:34537]. [ruby-dev:34492] + Sun Jun 15 22:21:07 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> * dln.c (dln_find_1): prior files with extensions to files sans @@ -78,7 +78,7 @@ rb_memcicmp(x, y, len) int tmp; while (len--) { - if (tmp = casetable[(unsigned)*p1++] - casetable[(unsigned)*p2++]) + if ((tmp = casetable[(unsigned)*p1++] - casetable[(unsigned)*p2++]) != 0) return tmp; } return 0; @@ -892,7 +892,7 @@ rb_reg_search(re, str, pos, reverse) { long result; VALUE match; - static struct re_registers regs; + struct re_registers regs; long range; if (pos > RSTRING(str)->len || pos < 0) { @@ -914,6 +914,7 @@ rb_reg_search(re, str, pos, reverse) else { range = RSTRING(str)->len - pos; } + MEMZERO(®s, struct re_registers, 1); result = re_search(RREGEXP(re)->ptr,RSTRING(str)->ptr,RSTRING(str)->len, pos, range, ®s); @@ -2,7 +2,7 @@ #define RUBY_RELEASE_DATE "2008-06-15" #define RUBY_VERSION_CODE 185 #define RUBY_RELEASE_CODE 20080615 -#define RUBY_PATCHLEVEL 199 +#define RUBY_PATCHLEVEL 200 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 |