[Groonga-commit] groonga/groonga at a01049b [master] mrb: accessor must be unliked

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Mar 16 14:12:03 JST 2017


Kouhei Sutou	2017-03-16 14:12:03 +0900 (Thu, 16 Mar 2017)

  New Revision: a01049b29e4578d54c8aa9bf43f8db5cd4521060
  https://github.com/groonga/groonga/commit/a01049b29e4578d54c8aa9bf43f8db5cd4521060

  Message:
    mrb: accessor must be unliked

  Modified files:
    lib/mrb/mrb_table_sort_key.c

  Modified: lib/mrb/mrb_table_sort_key.c (+6 -0)
===================================================================
--- lib/mrb/mrb_table_sort_key.c    2017-03-16 12:08:16 +0900 (46aea98)
+++ lib/mrb/mrb_table_sort_key.c    2017-03-16 14:12:03 +0900 (860dd2b)
@@ -32,12 +32,18 @@
 static void
 mrb_grn_table_sort_key_free(mrb_state *mrb, void *data)
 {
+  grn_ctx *ctx = (grn_ctx *)mrb->ud;
   grn_table_sort_key *sort_key = data;
 
   if (!sort_key) {
     return;
   }
 
+  if (sort_key->key) {
+    if (sort_key->key->header.type == GRN_ACCESSOR) {
+      grn_obj_unlink(ctx, sort_key->key);
+    }
+  }
   mrb_free(mrb, sort_key);
 }
 
-------------- next part --------------
HTML����������������������������...
Download 



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