From 17c48bebf87828abeb5be91ed8ba0a2b72bc5479 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 12 Oct 2010 14:35:40 +0000 Subject: [PATCH] * compile.c (iseq_build_body), insns.def (getglobal, setglobal), iseq.c (iseq_load, iseq_data_to_ary), util.c (valid_filename): use VALUE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 +++++- compile.c | 6 +++--- insns.def | 4 ++-- iseq.c | 4 ++-- util.c | 2 +- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index e6c5b83a8d..cf19dfb8e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ -Tue Oct 12 23:09:24 2010 Nobuyoshi Nakada +Tue Oct 12 23:35:37 2010 Nobuyoshi Nakada + + * compile.c (iseq_build_body), insns.def (getglobal, setglobal), + iseq.c (iseq_load, iseq_data_to_ary), util.c (valid_filename): + use VALUE. * gc.c (obj_free, rb_objspace_call_finalizer): fix truncating cast. diff --git a/compile.c b/compile.c index 6501565c00..d73e669769 100644 --- a/compile.c +++ b/compile.c @@ -5268,7 +5268,7 @@ iseq_build_body(rb_iseq_t *iseq, LINK_ANCHOR *anchor, "unknown instruction: %s", RSTRING_PTR(insn)); } - if (argc != insn_len(insn_id)-1) { + if (argc != insn_len((VALUE)insn_id)-1) { rb_compile_error(RSTRING_PTR(iseq->filename), line_no, "operand size mismatch"); } @@ -5277,7 +5277,7 @@ iseq_build_body(rb_iseq_t *iseq, LINK_ANCHOR *anchor, argv = compile_data_alloc(iseq, sizeof(VALUE) * argc); for (j=0; jinsn_info_table[i].line_no != line) { diff --git a/util.c b/util.c index 94396a3991..6cd2d2049e 100644 --- a/util.c +++ b/util.c @@ -373,7 +373,7 @@ valid_filename(const char *s) #define D ((int*)d) #define mmprepare(base, size) do {\ - if (((long)base & (0x3)) == 0)\ + if (((VALUE)base & (0x3)) == 0)\ if (size >= 16) mmkind = 1;\ else mmkind = 0;\ else mmkind = -1;\