1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2024-11-13 11:04:27 -05:00

Ruby: convert IDs to VALUEs

This commit is contained in:
Alex Kotov 2022-01-26 00:16:18 +05:00
parent e55c3a707f
commit a558933e3d
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
4 changed files with 9 additions and 7 deletions

View file

@ -13,7 +13,7 @@ static VALUE rb_KernAux = Qnil;
void init_assert()
{
rb_gc_register_mark_object(rb_intern_call = rb_intern("call"));
rb_gc_register_mark_object(ID2SYM(rb_intern_call = rb_intern("call")));
rb_gc_register_mark_object(rb_KernAux = rb_define_module("KernAux"));
kernaux_assert_cb = assert_cb;

View file

@ -39,8 +39,8 @@ static VALUE rb_ANON_Data = Qnil;
void init_cmdline()
{
rb_gc_register_mark_object(rb_intern_freeze = rb_intern("freeze"));
rb_gc_register_mark_object(rb_intern_new = rb_intern("new"));
rb_gc_register_mark_object(ID2SYM(rb_intern_freeze = rb_intern("freeze")));
rb_gc_register_mark_object(ID2SYM(rb_intern_new = rb_intern("new")));
rb_gc_register_mark_object(rb_KernAux = rb_define_module("KernAux"));
rb_gc_register_mark_object(rb_KernAux_Error =

View file

@ -16,12 +16,14 @@ static VALUE rb_KernAux_itoa16(VALUE self, VALUE number);
static ID rb_intern_LESS = Qnil;
static ID rb_intern_freeze = Qnil;
static VALUE rb_KernAux = Qnil;
void init_ntoa()
{
rb_gc_register_mark_object(rb_intern_LESS = rb_intern("<"));
rb_gc_register_mark_object(rb_intern_freeze = rb_intern("freeze"));
rb_gc_register_mark_object(ID2SYM(rb_intern_LESS = rb_intern("<")));
rb_gc_register_mark_object(ID2SYM(rb_intern_freeze = rb_intern("freeze")));
rb_gc_register_mark_object(rb_KernAux = rb_define_module("KernAux"));
#ifdef HAVE_KERNAUX_UTOA10

View file

@ -10,7 +10,7 @@ static VALUE rb_KernAux = Qnil;
void init_printf()
{
rb_gc_register_mark_object(rb_intern_freeze = rb_intern("freeze"));
rb_gc_register_mark_object(ID2SYM(rb_intern_freeze = rb_intern("freeze")));
rb_gc_register_mark_object(rb_KernAux = rb_define_module("KernAux"));
rb_define_singleton_method(rb_KernAux, "snprintf1",