summaryrefslogtreecommitdiff
path: root/compile.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-20 07:11:35 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-20 07:11:35 +0000
commit39c56c33490275091939ba33ee18b03b140ea3b7 (patch)
tree0a0e7b1a90c1475d32669798d0ae72647560616c /compile.h
parent98a54d46f74bf3c7b60b83bcc73e0b312425a1bb (diff)
* compile.c, compile.h (DECL_ANCHOR, INIT_ANCHOR): split not to
initialize aggregations with dynamic values. [ruby-talk:259306] * eval.c (rb_protect): not to initialize aggregations with dynamic values. [ruby-talk:259306] * gc.c (mark_current_machine_context): ditto. * thread.c (thgroup_list, call_trace_func): ditto. * vm.c (vm_init_redefined_flag): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.h')
-rw-r--r--compile.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/compile.h b/compile.h
index e40517e3d4..ca3c1c96d9 100644
--- a/compile.h
+++ b/compile.h
@@ -211,8 +211,12 @@ r_value(VALUE value)
#define COMPILE_OK 1
#define COMPILE_NG 0
+
+/* leave name uninitialized so that compiler warn if INIT_ANCHOR is
+ * missing */
#define DECL_ANCHOR(name) \
- LINK_ANCHOR name##_body__ = {{0,}, &name##_body__.anchor}; \
- LINK_ANCHOR *name = & name##_body__
+ LINK_ANCHOR *name, name##_body__ = {{0,},}
+#define INIT_ANCHOR(name) \
+ (name##_body__.last = &name##_body__.anchor, name = &name##_body__)
#endif /* RUBY_COMPILE_H */