From cd6cffa7b6b4828016f5ff0cffdde732a0548a92 Mon Sep 17 00:00:00 2001 From: usa Date: Fri, 28 Jun 2002 14:53:03 +0000 Subject: * pack.c (pack_unpack): change names of local variables because their names are overlapped. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ pack.c | 32 ++++++++++++++++---------------- version.h | 4 ++-- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index ac9513e743..f746572d58 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Jun 28 23:49:34 2002 NAKAMURA Usaku + + * pack.c (pack_unpack): change names of local variables because their + names are overlapped. + Fri Jun 28 17:54:07 2002 Tanaka Akira * lib/pp.rb: fix object address. diff --git a/pack.c b/pack.c index 8e072c9683..f1d9fd1863 100644 --- a/pack.c +++ b/pack.c @@ -1491,8 +1491,8 @@ pack_unpack(str, fmt) case 'u': { - VALUE str = infected_str_new(0, (send - s)*3/4, str); - char *ptr = RSTRING(str)->ptr; + VALUE buf = infected_str_new(0, (send - s)*3/4, str); + char *ptr = RSTRING(buf)->ptr; int total = 0; while (s < send && *s > ' ' && *s < 'a') { @@ -1502,9 +1502,9 @@ pack_unpack(str, fmt) hunk[3] = '\0'; len = (*s++ - ' ') & 077; total += len; - if (total > RSTRING(str)->len) { - len -= total - RSTRING(str)->len; - total = RSTRING(str)->len; + if (total > RSTRING(buf)->len) { + len -= total - RSTRING(buf)->len; + total = RSTRING(buf)->len; } while (len > 0) { @@ -1539,16 +1539,16 @@ pack_unpack(str, fmt) s += 2; /* possible checksum byte */ } - RSTRING(str)->ptr[total] = '\0'; - RSTRING(str)->len = total; - rb_ary_push(ary, str); + RSTRING(buf)->ptr[total] = '\0'; + RSTRING(buf)->len = total; + rb_ary_push(ary, buf); } break; case 'm': { - VALUE str = infected_str_new(0, (send - s)*3/4, str); - char *ptr = RSTRING(str)->ptr; + VALUE buf = infected_str_new(0, (send - s)*3/4, str); + char *ptr = RSTRING(buf)->ptr; int a,b,c = 0,d; static int first = 1; static int b64_xtable[256]; @@ -1583,15 +1583,15 @@ pack_unpack(str, fmt) *ptr++ = b << 4 | c >> 2; } *ptr = '\0'; - RSTRING(str)->len = ptr - RSTRING(str)->ptr; - rb_ary_push(ary, str); + RSTRING(buf)->len = ptr - RSTRING(buf)->ptr; + rb_ary_push(ary, buf); } break; case 'M': { - VALUE str = infected_str_new(0, send - s, str); - char *ptr = RSTRING(str)->ptr; + VALUE buf = infected_str_new(0, send - s, str); + char *ptr = RSTRING(buf)->ptr; int c1, c2; while (s < send) { @@ -1610,8 +1610,8 @@ pack_unpack(str, fmt) s++; } *ptr = '\0'; - RSTRING(str)->len = ptr - RSTRING(str)->ptr; - rb_ary_push(ary, str); + RSTRING(buf)->len = ptr - RSTRING(buf)->ptr; + rb_ary_push(ary, buf); } break; diff --git a/version.h b/version.h index abb17fda0e..625bc3eaad 100644 --- a/version.h +++ b/version.h @@ -1,4 +1,4 @@ #define RUBY_VERSION "1.7.2" -#define RUBY_RELEASE_DATE "2002-06-26" +#define RUBY_RELEASE_DATE "2002-06-28" #define RUBY_VERSION_CODE 172 -#define RUBY_RELEASE_CODE 20020626 +#define RUBY_RELEASE_CODE 20020628 -- cgit v1.2.3