summaryrefslogtreecommitdiff
path: root/storage/mroonga/vendor/groonga/lib/mrb/mrb_table_group_result.c
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2017-12-11 15:43:41 +0300
committerAleksey Midenkov <midenok@gmail.com>2017-12-11 15:43:41 +0300
commit79dd77e6aebc861b82e4895941224bbbad441650 (patch)
tree8c22b54de7964a89358415b5380c2bc734f162a1 /storage/mroonga/vendor/groonga/lib/mrb/mrb_table_group_result.c
parentb7cd18289639b30fafc7f623c1187e442608727c (diff)
parent8f581e8bf1d400be08995b1cf8c11e3b0f7ae283 (diff)
downloadmariadb-git-79dd77e6aebc861b82e4895941224bbbad441650.tar.gz
System Versioning 1.0 pre3
Merge branch '10.3' into trunk
Diffstat (limited to 'storage/mroonga/vendor/groonga/lib/mrb/mrb_table_group_result.c')
-rw-r--r--storage/mroonga/vendor/groonga/lib/mrb/mrb_table_group_result.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/storage/mroonga/vendor/groonga/lib/mrb/mrb_table_group_result.c b/storage/mroonga/vendor/groonga/lib/mrb/mrb_table_group_result.c
index 970ebd06220..02c73c759c1 100644
--- a/storage/mroonga/vendor/groonga/lib/mrb/mrb_table_group_result.c
+++ b/storage/mroonga/vendor/groonga/lib/mrb/mrb_table_group_result.c
@@ -182,15 +182,15 @@ mrb_grn_table_group_result_set_operator(mrb_state *mrb, mrb_value self)
}
static mrb_value
-mrb_grn_table_group_result_set_max_n_subrecs(mrb_state *mrb, mrb_value self)
+mrb_grn_table_group_result_set_max_n_sub_records(mrb_state *mrb, mrb_value self)
{
grn_table_group_result *result;
- mrb_int max_n_subrecs;
+ mrb_int max_n_sub_records;
result = DATA_PTR(self);
- mrb_get_args(mrb, "i", &max_n_subrecs);
+ mrb_get_args(mrb, "i", &max_n_sub_records);
- result->max_n_subrecs = max_n_subrecs;
+ result->max_n_subrecs = max_n_sub_records;
return mrb_nil_value();
}
@@ -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();
}
@@ -241,8 +245,8 @@ grn_mrb_table_group_result_init(grn_ctx *ctx)
mrb_grn_table_group_result_set_flags, MRB_ARGS_REQ(1));
mrb_define_method(mrb, klass, "operator=",
mrb_grn_table_group_result_set_operator, MRB_ARGS_REQ(1));
- mrb_define_method(mrb, klass, "max_n_subrecs=",
- mrb_grn_table_group_result_set_max_n_subrecs,
+ mrb_define_method(mrb, klass, "max_n_sub_records=",
+ mrb_grn_table_group_result_set_max_n_sub_records,
MRB_ARGS_REQ(1));
mrb_define_method(mrb, klass, "calc_target=",
mrb_grn_table_group_result_set_calc_target, MRB_ARGS_REQ(1));