[Groonga-commit] ranguba/rroonga at 0070c03 [master] use `rb_str2stm()` instead of `ID2SYM(rb_intern())`

Back to archive index

cosmo0920 null+****@clear*****
Mon Sep 29 00:28:55 JST 2014


cosmo0920	2014-09-29 00:28:55 +0900 (Mon, 29 Sep 2014)

  New Revision: 0070c031ba8ad24f7df9eaabcb1b8623f6166cf6
  https://github.com/ranguba/rroonga/commit/0070c031ba8ad24f7df9eaabcb1b8623f6166cf6

  Message:
    use `rb_str2stm()` instead of `ID2SYM(rb_intern())`

  Modified files:
    ext/groonga/rb-grn-posting.c
    ext/groonga/rb-grn-variable-size-column.c
    ext/groonga/rb-grn.h

  Modified: ext/groonga/rb-grn-posting.c (+3 -3)
===================================================================
--- ext/groonga/rb-grn-posting.c    2014-09-29 00:11:07 +0900 (a74c052)
+++ ext/groonga/rb-grn-posting.c    2014-09-29 00:28:55 +0900 (5760249)
@@ -30,7 +30,7 @@ rb_grn_posting_new (grn_posting *posting, grn_id term_id,
     parameters = rb_hash_new();
 
 #define SET_PARAMETER(key, value) \
-    rb_hash_aset(parameters, ID2SYM(rb_intern((key))), INT2NUM((value)))
+    rb_hash_aset(parameters, rb_str2sym((key)), INT2NUM((value)))
 
     SET_PARAMETER("record_id", posting->rid);
     SET_PARAMETER("section_id", posting->sid);
@@ -42,8 +42,8 @@ rb_grn_posting_new (grn_posting *posting, grn_id term_id,
 
 #undef SET_PARAMETER
 
-    rb_hash_aset(parameters, ID2SYM(rb_intern("table")), rb_table);
-    rb_hash_aset(parameters, ID2SYM(rb_intern("lexicon")), rb_lexicon);
+    rb_hash_aset(parameters, rb_str2sym("table"), rb_table);
+    rb_hash_aset(parameters, rb_str2sym("lexicon"), rb_lexicon);
 
     return rb_funcall(rb_cGrnPosting, rb_intern("new"), 1,
                       parameters);

  Modified: ext/groonga/rb-grn-variable-size-column.c (+2 -2)
===================================================================
--- ext/groonga/rb-grn-variable-size-column.c    2014-09-29 00:11:07 +0900 (76c2cad)
+++ ext/groonga/rb-grn-variable-size-column.c    2014-09-29 00:28:55 +0900 (73ff946)
@@ -210,10 +210,10 @@ rb_grn_variable_size_column_array_reference (VALUE self, VALUE rb_id)
 
         rb_element = rb_hash_new();
         rb_hash_aset(rb_element,
-                     ID2SYM(rb_intern("value")),
+                     rb_str2sym("value"),
                      rb_element_value);
         rb_hash_aset(rb_element,
-                     ID2SYM(rb_intern("weight")),
+                     rb_str2sym("weight"),
                      UINT2NUM(weight));
 
         rb_ary_push(rb_value, rb_element);

  Modified: ext/groonga/rb-grn.h (+1 -1)
===================================================================
--- ext/groonga/rb-grn.h    2014-09-29 00:11:07 +0900 (7444a3e)
+++ ext/groonga/rb-grn.h    2014-09-29 00:28:55 +0900 (909126d)
@@ -584,7 +584,7 @@ VALUE          rb_grn_column_expression_builder_build
                                                     (VALUE self);
 
 
-#define RB_GRN_INTERN(string)         (ID2SYM(rb_intern(string)))
+#define RB_GRN_INTERN(string)         (rb_str2sym(string))
 
 #define RVAL2CBOOL(object)            (RTEST(object))
 #define CBOOL2RVAL(boolean)           ((boolean) ? Qtrue : Qfalse)
-------------- next part --------------
HTML����������������������������...
다운로드 



More information about the Groonga-commit mailing list
Back to archive index