2012-12-04 21:36:19 +04:00
|
|
|
%# -*- c -*-
|
|
|
|
/* DO NOT EDIT THIS FILE DIRECTLY */
|
|
|
|
/**********************************************************************
|
|
|
|
|
|
|
|
id.c -
|
|
|
|
|
|
|
|
$Author$
|
|
|
|
created at: Wed Dec 5 02:36:10 2012
|
|
|
|
|
|
|
|
Copyright (C) 2004-2007 Koichi Sasada
|
|
|
|
|
|
|
|
**********************************************************************/
|
|
|
|
<%
|
2012-12-21 11:38:07 +04:00
|
|
|
defs = File.join(File.dirname(File.dirname(erb.filename)), "defs/id.def")
|
2012-12-21 11:38:03 +04:00
|
|
|
ids = eval(File.read(defs), binding, defs)
|
2012-12-04 21:36:19 +04:00
|
|
|
%>
|
|
|
|
static void
|
|
|
|
Init_id(void)
|
|
|
|
{
|
|
|
|
#undef rb_intern
|
|
|
|
#define rb_intern(str) rb_intern_const(str)
|
|
|
|
rb_encoding *enc = rb_usascii_encoding();
|
|
|
|
|
2012-12-21 11:38:03 +04:00
|
|
|
% ids[:predefined].each do |token, name|
|
2012-12-04 21:36:19 +04:00
|
|
|
REGISTER_SYMID(id<%=token%>, "<%=name%>");
|
|
|
|
% end
|
|
|
|
}
|