[Groonga-commit] ranguba/rroonga at 235b38b [master] Use grn_obj_type_to_string() instead of rb_grn_inspect_type() completely

Back to archive index

Masafumi Yokoyama null+****@clear*****
Sun Mar 6 23:17:21 JST 2016


Masafumi Yokoyama	2016-03-06 23:17:21 +0900 (Sun, 06 Mar 2016)

  New Revision: 235b38bd118197f1156df9f95ad53e4545d61c6a
  https://github.com/ranguba/rroonga/commit/235b38bd118197f1156df9f95ad53e4545d61c6a

  Message:
    Use grn_obj_type_to_string() instead of rb_grn_inspect_type() completely
    
    ref: 042fbeb4a8c4078727c86e8044b43c715fa7b8df

  Modified files:
    ext/groonga/rb-grn-object.c
    ext/groonga/rb-grn.h

  Modified: ext/groonga/rb-grn-object.c (+10 -10)
===================================================================
--- ext/groonga/rb-grn-object.c    2016-03-06 22:24:19 +0900 (2f20c25)
+++ ext/groonga/rb-grn-object.c    2016-03-06 23:17:21 +0900 (904e7fa)
@@ -93,7 +93,7 @@ rb_grn_object_unbind (RbGrnObject *rb_grn_object)
 {
     debug("unbind: %p:%p:%p %s(%#x)\n",
           rb_grn_object->context, rb_grn_object->object, rb_grn_object,
-          rb_grn_inspect_type(rb_grn_object->object->header.type),
+          grn_obj_type_to_string(rb_grn_object->object->header.type),
           rb_grn_object->object->header.type);
 
     rb_grn_object->rb_grn_context = NULL;
@@ -116,7 +116,7 @@ rb_grn_object_run_finalizer (grn_ctx *context, grn_obj *grn_object,
           context, grn_object, rb_grn_object,
           rb_grn_object->context, rb_grn_object->object,
           rb_grn_object->rb_grn_context,
-          rb_grn_inspect_type(grn_object->header.type),
+          grn_obj_type_to_string(grn_object->header.type),
           grn_object->header.type);
 
     rb_grn_context = rb_grn_object->rb_grn_context;
@@ -173,7 +173,7 @@ rb_grn_object_run_finalizer (grn_ctx *context, grn_obj *grn_object,
     default:
         rb_raise(rb_eTypeError,
                  "unsupported Groonga object type for finalizer: %s(%#x)",
-                 rb_grn_inspect_type(grn_object->header.type),
+                 grn_obj_type_to_string(grn_object->header.type),
                  grn_object->header.type);
         break;
     }
@@ -217,7 +217,7 @@ rb_grn_object_free (RbGrnObject *rb_grn_object)
             user_data = grn_obj_user_data(context, grn_object);
         }
         debug("type: %s(%#x); need_close: %d; user_data: %p; ptr: %p\n",
-              rb_grn_inspect_type(grn_object->header.type),
+              grn_obj_type_to_string(grn_object->header.type),
               grn_object->header.type,
               rb_grn_object->need_close,
               user_data,
@@ -362,7 +362,7 @@ rb_grn_object_bind_common (VALUE klass, VALUE self, VALUE rb_context,
 
     debug("bind: %p:%p:%p %s(%#x)\n",
           context, object, rb_grn_object,
-          rb_grn_inspect_type(object->header.type),
+          grn_obj_type_to_string(object->header.type),
           object->header.type);
 
     Data_Get_Struct(rb_context, RbGrnContext, rb_grn_context);
@@ -378,7 +378,7 @@ rb_grn_object_bind_common (VALUE klass, VALUE self, VALUE rb_context,
     if (user_data) {
         debug("set-finalizer: %p:%p:%p %s(%#x)\n",
               context, object, rb_grn_object,
-              rb_grn_inspect_type(object->header.type),
+              grn_obj_type_to_string(object->header.type),
               object->header.type);
         user_data->ptr = rb_grn_object;
         grn_obj_set_finalizer(context, object, rb_grn_object_finalizer);
@@ -386,7 +386,7 @@ rb_grn_object_bind_common (VALUE klass, VALUE self, VALUE rb_context,
     } else if (object->header.type == GRN_ACCESSOR) {
         debug("set-finalizer(implicit): %p:%p:%p %s(%#x)\n",
               context, object, rb_grn_object,
-              rb_grn_inspect_type(object->header.type),
+              grn_obj_type_to_string(object->header.type),
               object->header.type);
         rb_grn_object->have_finalizer = GRN_TRUE;
     }
@@ -500,7 +500,7 @@ rb_grn_object_assign (VALUE klass, VALUE self, VALUE rb_context,
     } else {
         rb_raise(rb_eTypeError,
                  "unsupported Groonga object type for assignment: %s(%#x)",
-                 rb_grn_inspect_type(object->header.type),
+                 grn_obj_type_to_string(object->header.type),
                  object->header.type);
     }
 
@@ -508,7 +508,7 @@ rb_grn_object_assign (VALUE klass, VALUE self, VALUE rb_context,
 
     debug("assign: %p:%p:%p %s(%#x)\n",
           context, object, rb_grn_object,
-          rb_grn_inspect_type(object->header.type), object->header.type);
+          grn_obj_type_to_string(object->header.type), object->header.type);
 }
 
 void
@@ -545,7 +545,7 @@ rb_grn_named_object_set_name (RbGrnNamedObject *rb_grn_named_object,
               RB_GRN_OBJECT(rb_grn_named_object)->context,
               RB_GRN_OBJECT(rb_grn_named_object)->object,
               rb_grn_named_object,
-              rb_grn_inspect_type(RB_GRN_OBJECT(rb_grn_named_object)->header.type),
+              grn_obj_type_to_string(RB_GRN_OBJECT(rb_grn_named_object)->header.type),
               RB_GRN_OBJECT(rb_grn_named_object)->object->header.type,
               name_size, name);
     }

  Modified: ext/groonga/rb-grn.h (+0 -1)
===================================================================
--- ext/groonga/rb-grn.h    2016-03-06 22:24:19 +0900 (740cd56)
+++ ext/groonga/rb-grn.h    2016-03-06 23:17:21 +0900 (f5a94df)
@@ -383,7 +383,6 @@ void           rb_grn_context_object_created        (VALUE rb_context,
                                                      VALUE rb_object);
 
 const char    *rb_grn_inspect                       (VALUE object);
-const char    *rb_grn_inspect_type                  (unsigned char type);
 void           rb_grn_scan_options                  (VALUE options, ...)
                                                      RB_GRN_GNUC_NULL_TERMINATED;
 grn_bool       rb_grn_equal_option                  (VALUE option,
-------------- next part --------------
HTML����������������������������...
Download 



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