From f61b80079e086e9fbeb767b80992a1abada1c719 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 11 Mar 2009 20:19:24 +0000 Subject: [PATCH] * iseq.c (rb_iseq_disasm): RSTRING_LEN() returns long. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 +++- iseq.c | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 40d4c74c0f..b4fa136b09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ -Thu Mar 12 05:16:07 2009 Nobuyoshi Nakada +Thu Mar 12 05:19:22 2009 Nobuyoshi Nakada + + * iseq.c (rb_iseq_disasm): RSTRING_LEN() returns long. * process.c (rb_f_sleep): time() needs time_t. diff --git a/iseq.c b/iseq.c index 9ed839cadb..cc2ffaaa93 100644 --- a/iseq.c +++ b/iseq.c @@ -860,6 +860,7 @@ rb_iseq_disasm(VALUE self) VALUE child = rb_ary_new(); unsigned long size; int i; + long l; ID *tbl; enum {header_minlen = 72}; @@ -871,9 +872,9 @@ rb_iseq_disasm(VALUE self) rb_str_cat2(str, "== disasm: "); rb_str_concat(str, iseq_inspect(iseqdat->self)); - if ((i = RSTRING_LEN(str)) < header_minlen) { + if ((l = RSTRING_LEN(str)) < header_minlen) { rb_str_resize(str, header_minlen); - memset(RSTRING_PTR(str) + i, '=', header_minlen - i); + memset(RSTRING_PTR(str) + l, '=', header_minlen - l); } rb_str_cat2(str, "\n");