cosmo0920
null+****@clear*****
Mon Sep 29 02:35:45 JST 2014
cosmo0920 2014-09-29 02:35:45 +0900 (Mon, 29 Sep 2014) New Revision: f64f79199b226836c04d1cdb0d1bf69f245a77e3 https://github.com/ranguba/rroonga/commit/f64f79199b226836c04d1cdb0d1bf69f245a77e3 Message: use `SYM2STR` name for symbol GC macro Using rb_sym2str name causes confusing. There is differnce of original rb_sym2str and macro's rb_sym2str. So, it shuold be rename. Modified files: ext/groonga/rb-grn-context.c ext/groonga/rb-grn-table.c ext/groonga/rb-grn.h Modified: ext/groonga/rb-grn-context.c (+1 -1) =================================================================== --- ext/groonga/rb-grn-context.c 2014-09-29 02:23:02 +0900 (f6fb14c) +++ ext/groonga/rb-grn-context.c 2014-09-29 02:35:45 +0900 (d2131ed) @@ -902,7 +902,7 @@ rb_grn_context_array_reference (VALUE self, VALUE name_or_id) context = SELF(self); switch (TYPE(name_or_id)) { case T_SYMBOL: - name = rb_sym2str(name_or_id); + name = SYM2STR(name_or_id); name_size = strlen(name); object = rb_grn_context_get_backward_compatibility(context, name, name_size); Modified: ext/groonga/rb-grn-table.c (+1 -1) =================================================================== --- ext/groonga/rb-grn-table.c 2014-09-29 02:23:02 +0900 (fc5b4de) +++ ext/groonga/rb-grn-table.c 2014-09-29 02:35:45 +0900 (60ea9f2) @@ -470,7 +470,7 @@ ruby_object_to_column_name (VALUE rb_name, { switch (TYPE(rb_name)) { case T_SYMBOL: - *name = rb_sym2str(rb_name); + *name = SYM2STR(rb_name); *name_size = strlen(*name); break; case T_STRING: Modified: ext/groonga/rb-grn.h (+2 -2) =================================================================== --- ext/groonga/rb-grn.h 2014-09-29 02:23:02 +0900 (f20e1f0) +++ ext/groonga/rb-grn.h 2014-09-29 02:35:45 +0900 (e31506c) @@ -41,9 +41,9 @@ #endif #ifndef HAVE_RB_SYM2STR -# define rb_sym2str(name) (rb_id2name(SYM2ID(name))) +# define SYM2STR(name) (rb_id2name(SYM2ID(name))) #else -# define rb_sym2str(name) (RSTRING_PTR(rb_sym2str(name))) +# define SYM2STR(name) (RSTRING_PTR(rb_sym2str(name))) #endif #ifndef HAVE_RB_TO_SYMBOL -------------- next part -------------- HTML����������������������������... Download