[Groonga-commit] groonga/groonga at e29847e [master] mrb: accept nil for TableGroupResult#calc_target=

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Jul 6 16:45:03 JST 2015


Kouhei Sutou	2015-07-06 16:45:03 +0900 (Mon, 06 Jul 2015)

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

  Message:
    mrb: accept nil for TableGroupResult#calc_target=

  Modified files:
    lib/mrb/mrb_table_group_result.c

  Modified: lib/mrb/mrb_table_group_result.c (+5 -1)
===================================================================
--- lib/mrb/mrb_table_group_result.c    2015-07-06 14:05:54 +0900 (970ebd0)
+++ lib/mrb/mrb_table_group_result.c    2015-07-06 16:45:03 +0900 (e629ae1)
@@ -204,7 +204,11 @@ mrb_grn_table_group_result_set_calc_target(mrb_state *mrb, mrb_value self)
   result = DATA_PTR(self);
   mrb_get_args(mrb, "o", &mrb_calc_target);
 
-  result->calc_target = DATA_PTR(mrb_calc_target);
+  if (mrb_nil_p(mrb_calc_target)) {
+    result->calc_target = NULL;
+  } else {
+    result->calc_target = DATA_PTR(mrb_calc_target);
+  }
 
   return mrb_nil_value();
 }
-------------- next part --------------
HTML����������������������������...
Download 



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