Skip to content

Commit

Permalink
Fix Ruby -> C conversion of :max_n_sub_records of Table#group
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Mar 20, 2014
1 parent 5faedd7 commit fa9202d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ext/groonga/rb-grn-table.c
Expand Up @@ -1283,7 +1283,8 @@ rb_grn_table_group (int argc, VALUE *argv, VALUE self)
grn_obj *table;
grn_table_sort_key *keys;
grn_table_group_result *results;
int i, n_keys, n_results, max_n_sub_records = 0;
int i, n_keys, n_results;
unsigned int max_n_sub_records = 0;
grn_rc rc;
VALUE rb_keys, rb_options, rb_max_n_sub_records;
VALUE *rb_group_keys;
Expand All @@ -1309,7 +1310,7 @@ rb_grn_table_group (int argc, VALUE *argv, VALUE self)
NULL);

if (!NIL_P(rb_max_n_sub_records))
max_n_sub_records = NUM2INT(rb_max_n_sub_records);
max_n_sub_records = NUM2UINT(rb_max_n_sub_records);

keys = ALLOCA_N(grn_table_sort_key, n_keys);
for (i = 0; i < n_keys; i++) {
Expand Down

0 comments on commit fa9202d

Please sign in to comment.