ruby-changes:17456
From: nobu <ko1@a...>
Date: Tue, 12 Oct 2010 23:35:47 +0900 (JST)
Subject: [ruby-changes:17456] Ruby:r29461 (trunk): * compile.c (iseq_build_body), insns.def (getglobal, setglobal),
nobu 2010-10-12 23:35:40 +0900 (Tue, 12 Oct 2010) New Revision: 29461 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29461 Log: * compile.c (iseq_build_body), insns.def (getglobal, setglobal), iseq.c (iseq_load, iseq_data_to_ary), util.c (valid_filename): use VALUE. Modified files: trunk/ChangeLog trunk/compile.c trunk/insns.def trunk/iseq.c trunk/util.c Index: ChangeLog =================================================================== --- ChangeLog (revision 29460) +++ ChangeLog (revision 29461) @@ -1,5 +1,9 @@ -Tue Oct 12 23:09:24 2010 Nobuyoshi Nakada <nobu@r...> +Tue Oct 12 23:35:37 2010 Nobuyoshi Nakada <nobu@r...> + * 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. Index: insns.def =================================================================== --- insns.def (revision 29460) +++ insns.def (revision 29461) @@ -258,7 +258,7 @@ () (VALUE val) { - val = GET_GLOBAL(entry); + val = GET_GLOBAL((VALUE)entry); } /** @@ -272,7 +272,7 @@ (VALUE val) () { - SET_GLOBAL(entry, val); + SET_GLOBAL((VALUE)entry, val); } Index: iseq.c =================================================================== --- iseq.c (revision 29460) +++ iseq.c (revision 29461) @@ -512,7 +512,7 @@ make_compile_option(&option, opt); prepare_iseq_build(iseq, name, filename, filepath, line_no, - parent, iseq_type, 0, &option); + parent, (VALUE)iseq_type, 0, &option); rb_iseq_build_from_ary(iseq, locals, args, exception, body); @@ -1307,7 +1307,7 @@ VALUE label; if (st_lookup(labels_table, pos, &label)) { - rb_ary_push(body, label); + rb_ary_push(body, (VALUE)label); } if (iseq->insn_info_table[i].line_no != line) { Index: compile.c =================================================================== --- compile.c (revision 29460) +++ compile.c (revision 29461) @@ -5268,7 +5268,7 @@ "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 @@ argv = compile_data_alloc(iseq, sizeof(VALUE) * argc); for (j=0; j<argc; j++) { VALUE op = rb_ary_entry(obj, j+1); - switch (insn_op_type(insn_id, j)) { + switch (insn_op_type((VALUE)insn_id, j)) { case TS_OFFSET: { LABEL *label = register_label(iseq, labels_table, op); argv[j] = (VALUE)label; @@ -5341,7 +5341,7 @@ } break; default: - rb_raise(rb_eSyntaxError, "unknown operand: %c", insn_op_type(insn_id, j)); + rb_raise(rb_eSyntaxError, "unknown operand: %c", insn_op_type((VALUE)insn_id, j)); } } } Index: util.c =================================================================== --- util.c (revision 29460) +++ util.c (revision 29461) @@ -373,7 +373,7 @@ #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;\ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/