c_constant c_constantNew( c_metaObject scope, const c_char *name, c_value value) { c_constant o; c_literal l; o = c_constant(c_metaDeclare(scope,name,M_CONSTANT)); l = c_literal(c_metaDefine(scope,M_LITERAL)); l->value = value; o->operand = c_operand(l); return o; }
VALUE rb_constant( VALUE self, VALUE name ) { Check_Type( name, T_STRING ); return ULONG2NUM( c_constant( RSTRING_PTR(name) ) ); }