aboutsummaryrefslogtreecommitdiffstats
path: root/template/id.c.tmpl
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-21 07:38:03 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-21 07:38:03 +0000
commit298694a2fdf4451163299d61a49a15fe49ab598a (patch)
treee58e7ee0155c1043c0da27a2e9c30699f8668a1c /template/id.c.tmpl
parente8794bf2151bf2427e9a69f86cd818c9ed24d0fa (diff)
downloadruby-298694a2fdf4451163299d61a49a15fe49ab598a.tar.gz
id.def: other scope ID
* defs/id.def: support for other scope IDs, ID_{INSTANCE,GLOBAL,CONST,CLASS}. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'template/id.c.tmpl')
-rw-r--r--template/id.c.tmpl5
1 files changed, 2 insertions, 3 deletions
diff --git a/template/id.c.tmpl b/template/id.c.tmpl
index 4f54f8b4a0..4a272a98ba 100644
--- a/template/id.c.tmpl
+++ b/template/id.c.tmpl
@@ -11,9 +11,8 @@
**********************************************************************/
<%
-predefined_ids = nil
defs = File.join(File.dirname(erb.filename), "../defs/id.def")
-eval(File.read(defs), binding, defs)
+ids = eval(File.read(defs), binding, defs)
%>
static void
Init_id(void)
@@ -22,7 +21,7 @@ Init_id(void)
#define rb_intern(str) rb_intern_const(str)
rb_encoding *enc = rb_usascii_encoding();
-% predefined_ids.each_pair do |token, name|
+% ids[:predefined].each do |token, name|
REGISTER_SYMID(id<%=token%>, "<%=name%>");
% end
}