From c7782f91c863a873dc3ee4dd00288e98c9d26af4 Mon Sep 17 00:00:00 2001 From: yugui Date: Sun, 22 Feb 2009 12:49:21 +0000 Subject: merges r22259 from trunk into ruby_1_9_1. * compile.c (hide_obj): OBJ_FREEZE() is not an expression. a patch from nagachika at [ruby-dev:37977]. * compile.c (insn_set_sc_state): fixed typoe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@22533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ compile.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9931577d2f..4184ef34fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Thu Feb 12 22:51:18 2009 Nobuyoshi Nakada + + * compile.c (hide_obj): OBJ_FREEZE() is not an expression. a patch + from nagachika at [ruby-dev:37977]. + + * compile.c (insn_set_sc_state): fixed typoe. + Thu Feb 12 19:42:33 2009 Nobuyoshi Nakada * compile.c (compile_array_, defined_expr, iseq_compile_each): hide diff --git a/compile.c b/compile.c index 768006afae..cfe2edcc31 100644 --- a/compile.c +++ b/compile.c @@ -295,7 +295,7 @@ PRINTF_ARGS(void ruby_debug_printf(const char*, ...), 1, 2); #define INIT_ANCHOR(name) \ (name##_body__.last = &name##_body__.anchor, name = &name##_body__) -#define hide_obj(obj) (void)(OBJ_FREEZE(obj), RBASIC(obj)->klass = 0) +#define hide_obj(obj) do {OBJ_FREEZE(obj); RBASIC(obj)->klass = 0;} while (0) #include "optinsn.inc" #if OPT_INSTRUCTIONS_UNIFICATION @@ -1978,7 +1978,7 @@ insn_set_sc_state(rb_iseq_t *iseq, INSN *iobj, int state) dump_disasm_list((LINK_ELEMENT *)iobj); dump_disasm_list((LINK_ELEMENT *)lobj); printf("\n-- %d, %d\n", lobj->sc_state, nstate); - rb_compile_error(RSTRING_PTR(iseq->filename), iobj->lineno, + rb_compile_error(RSTRING_PTR(iseq->filename), iobj->line_no, "insn_set_sc_state error\n"); return 0; } -- cgit v1.2.3