[Groonga-commit] groonga/groonga at 7defb1f [master] GRN_OBJ_FORMAT_FIN: stop to close temporary columns

Back to archive index

Kouhei Sutou null+****@clear*****
Thu May 5 12:14:50 JST 2016


Kouhei Sutou	2016-05-05 12:14:50 +0900 (Thu, 05 May 2016)

  New Revision: 7defb1f625fbe2db4062593488fc5edbef920bc2
  https://github.com/groonga/groonga/commit/7defb1f625fbe2db4062593488fc5edbef920bc2

  Message:
    GRN_OBJ_FORMAT_FIN: stop to close temporary columns

  Modified files:
    include/groonga/output.h

  Modified: include/groonga/output.h (+7 -1)
===================================================================
--- include/groonga/output.h    2016-05-05 00:04:04 +0900 (4a62666)
+++ include/groonga/output.h    2016-05-05 12:14:50 +0900 (738fefd)
@@ -58,7 +58,13 @@ struct _grn_obj_format {
 #define GRN_OBJ_FORMAT_FIN(ctx,format) do {\
   int ncolumns = GRN_BULK_VSIZE(&(format)->columns) / sizeof(grn_obj *);\
   grn_obj **columns = (grn_obj **)GRN_BULK_HEAD(&(format)->columns);\
-  while (ncolumns--) { grn_obj_unlink((ctx), *columns++); }\
+  while (ncolumns--) {\
+    grn_obj *column = *columns;\
+    columns++;\
+    if (grn_obj_is_accessor((ctx), column)) {\
+      grn_obj_close((ctx), column);\
+    }\
+  }\
   GRN_OBJ_FIN((ctx), &(format)->columns);\
   if ((format)->expression) { GRN_OBJ_FIN((ctx), (format)->expression); } \
 } while (0)
-------------- next part --------------
HTML����������������������������...
Download 



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