[Groonga-commit] ranguba/rroonga at 5bd88d4 [master] Revert "use `rb_str2stm()` instead of `ID2SYM(rb_intern())`"

Back to archive index

cosmo0920 null+****@clear*****
Mon Sep 29 01:45:22 JST 2014


cosmo0920	2014-09-29 01:45:22 +0900 (Mon, 29 Sep 2014)

  New Revision: 5bd88d4290c12e8601e84eb89b25553ed6476b60
  https://github.com/ranguba/rroonga/commit/5bd88d4290c12e8601e84eb89b25553ed6476b60

  Message:
    Revert "use `rb_str2stm()` instead of `ID2SYM(rb_intern())`"
    
    This reverts commit 0070c031ba8ad24f7df9eaabcb1b8623f6166cf6.
    
    I've misunderstand here...

  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:28:55 +0900 (5760249)
+++ ext/groonga/rb-grn-posting.c    2014-09-29 01:45:22 +0900 (a74c052)
@@ -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, rb_str2sym((key)), INT2NUM((value)))
+    rb_hash_aset(parameters, ID2SYM(rb_intern((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, rb_str2sym("table"), rb_table);
-    rb_hash_aset(parameters, rb_str2sym("lexicon"), rb_lexicon);
+    rb_hash_aset(parameters, ID2SYM(rb_intern("table")), rb_table);
+    rb_hash_aset(parameters, ID2SYM(rb_intern("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:28:55 +0900 (73ff946)
+++ ext/groonga/rb-grn-variable-size-column.c    2014-09-29 01:45:22 +0900 (76c2cad)
@@ -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,
-                     rb_str2sym("value"),
+                     ID2SYM(rb_intern("value")),
                      rb_element_value);
         rb_hash_aset(rb_element,
-                     rb_str2sym("weight"),
+                     ID2SYM(rb_intern("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:28:55 +0900 (909126d)
+++ ext/groonga/rb-grn.h    2014-09-29 01:45:22 +0900 (7444a3e)
@@ -584,7 +584,7 @@ VALUE          rb_grn_column_expression_builder_build
                                                     (VALUE self);
 
 
-#define RB_GRN_INTERN(string)         (rb_str2sym(string))
+#define RB_GRN_INTERN(string)         (ID2SYM(rb_intern(string)))
 
 #define RVAL2CBOOL(object)            (RTEST(object))
 #define CBOOL2RVAL(boolean)           ((boolean) ? Qtrue : Qfalse)
-------------- next part --------------
HTML����������������������������...
Download 



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