rroonga 3.0.5-x86-mingw32 → 3.0.6-x86-mingw32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. data/AUTHORS +5 -0
  2. data/Gemfile +20 -0
  3. data/Rakefile +187 -0
  4. data/doc/text/news.textile +7 -0
  5. data/doc/text/tutorial.textile +0 -2
  6. data/ext/groonga/extconf.rb +7 -1
  7. data/ext/groonga/rb-grn-accessor.c +11 -11
  8. data/ext/groonga/rb-grn-array.c +25 -25
  9. data/ext/groonga/rb-grn-column.c +106 -106
  10. data/ext/groonga/rb-grn-context.c +121 -121
  11. data/ext/groonga/rb-grn-database.c +78 -78
  12. data/ext/groonga/rb-grn-double-array-trie.c +92 -92
  13. data/ext/groonga/rb-grn-encoding-support.c +1 -1
  14. data/ext/groonga/rb-grn-encoding.c +28 -28
  15. data/ext/groonga/rb-grn-exception.c +9 -9
  16. data/ext/groonga/rb-grn-expression-builder.c +6 -6
  17. data/ext/groonga/rb-grn-expression.c +87 -87
  18. data/ext/groonga/rb-grn-fix-size-column.c +12 -12
  19. data/ext/groonga/rb-grn-geo-point.c +2 -2
  20. data/ext/groonga/rb-grn-hash.c +38 -38
  21. data/ext/groonga/rb-grn-index-column.c +191 -191
  22. data/ext/groonga/rb-grn-index-cursor.c +29 -29
  23. data/ext/groonga/rb-grn-logger.c +36 -36
  24. data/ext/groonga/rb-grn-normalizer.c +10 -10
  25. data/ext/groonga/rb-grn-patricia-trie.c +196 -196
  26. data/ext/groonga/rb-grn-plugin.c +5 -5
  27. data/ext/groonga/rb-grn-posting.c +2 -2
  28. data/ext/groonga/rb-grn-procedure.c +2 -2
  29. data/ext/groonga/rb-grn-query-logger.c +1 -1
  30. data/ext/groonga/rb-grn-record.c +1 -1
  31. data/ext/groonga/rb-grn-snippet.c +14 -14
  32. data/ext/groonga/rb-grn-table-cursor-key-support.c +4 -4
  33. data/ext/groonga/rb-grn-table-cursor.c +52 -52
  34. data/ext/groonga/rb-grn-table-key-support.c +209 -209
  35. data/ext/groonga/rb-grn-type.c +18 -18
  36. data/ext/groonga/rb-grn-utils.c +332 -314
  37. data/ext/groonga/rb-grn-variable-size-column.c +34 -34
  38. data/ext/groonga/rb-grn-variable.c +2 -2
  39. data/ext/groonga/rb-grn.h +240 -232
  40. data/ext/groonga/rb-groonga.c +10 -10
  41. data/lib/1.9/groonga.so +0 -0
  42. data/lib/2.0/groonga.so +0 -0
  43. data/rroonga-build.rb +7 -0
  44. data/rroonga.gemspec +1 -1
  45. data/test/test-hash.rb +4 -4
  46. data/test/test-index-column.rb +271 -257
  47. data/test/test-table-key-support.rb +78 -0
  48. data/test/test-table.rb +78 -51
  49. metadata +8 -3
@@ -36,12 +36,12 @@ rb_grn_plugin_from_ruby_object (VALUE object)
36
36
  RbGrnPlugin *rb_grn_plugin;
37
37
 
38
38
  if (!RVAL2CBOOL(rb_obj_is_kind_of(object, cGrnPlugin))) {
39
- rb_raise(rb_eTypeError, "not a groonga plugin");
39
+ rb_raise(rb_eTypeError, "not a groonga plugin");
40
40
  }
41
41
 
42
42
  Data_Get_Struct(object, RbGrnPlugin, rb_grn_plugin);
43
43
  if (!rb_grn_plugin)
44
- rb_raise(rb_eGrnError, "groonga plugin is NULL");
44
+ rb_raise(rb_eGrnError, "groonga plugin is NULL");
45
45
  return rb_grn_plugin->id;
46
46
  }
47
47
 
@@ -152,9 +152,9 @@ rb_grn_init_plugin (VALUE mGrn)
152
152
  rb_define_alloc_func(cGrnPlugin, rb_grn_plugin_alloc);
153
153
 
154
154
  rb_define_singleton_method(cGrnPlugin, "register",
155
- rb_grn_plugin_s_register, -1);
155
+ rb_grn_plugin_s_register, -1);
156
156
  rb_define_singleton_method(cGrnPlugin, "system_plugins_dir",
157
- rb_grn_plugin_s_system_plugins_dir, 0);
157
+ rb_grn_plugin_s_system_plugins_dir, 0);
158
158
  rb_define_singleton_method(cGrnPlugin, "suffix",
159
- rb_grn_plugin_s_suffix, 0);
159
+ rb_grn_plugin_s_suffix, 0);
160
160
  }
@@ -23,7 +23,7 @@ VALUE rb_cGrnPosting;
23
23
 
24
24
  VALUE
25
25
  rb_grn_posting_new (grn_posting *posting, grn_id term_id,
26
- VALUE rb_table, VALUE rb_lexicon)
26
+ VALUE rb_table, VALUE rb_lexicon)
27
27
  {
28
28
  VALUE parameters;
29
29
 
@@ -46,7 +46,7 @@ rb_grn_posting_new (grn_posting *posting, grn_id term_id,
46
46
  rb_hash_aset(parameters, ID2SYM(rb_intern("lexicon")), rb_lexicon);
47
47
 
48
48
  return rb_funcall(rb_cGrnPosting, rb_intern("new"), 1,
49
- parameters);
49
+ parameters);
50
50
  }
51
51
 
52
52
  void
@@ -26,7 +26,7 @@ grn_obj *
26
26
  rb_grn_procedure_from_ruby_object (VALUE object)
27
27
  {
28
28
  if (!RVAL2CBOOL(rb_obj_is_kind_of(object, rb_cGrnProcedure))) {
29
- rb_raise(rb_eTypeError, "not a groonga procedure");
29
+ rb_raise(rb_eTypeError, "not a groonga procedure");
30
30
  }
31
31
 
32
32
  return RVAL2GRNOBJECT(object, NULL);
@@ -34,7 +34,7 @@ rb_grn_procedure_from_ruby_object (VALUE object)
34
34
 
35
35
  VALUE
36
36
  rb_grn_procedure_to_ruby_object (grn_ctx *context, grn_obj *procedure,
37
- grn_bool owner)
37
+ grn_bool owner)
38
38
  {
39
39
  return GRNOBJECT2RVAL(rb_cGrnProcedure, context, procedure, owner);
40
40
  }
@@ -234,7 +234,7 @@ rb_grn_query_logger_s_get_path (VALUE klass)
234
234
 
235
235
  path = grn_default_query_logger_get_path();
236
236
  if (path) {
237
- rb_path = rb_str_new2(path);
237
+ rb_path = rb_str_new2(path);
238
238
  }
239
239
  return rb_path;
240
240
  }
@@ -40,7 +40,7 @@ VALUE
40
40
  rb_grn_record_new_raw (VALUE table, VALUE rb_id, VALUE values)
41
41
  {
42
42
  return rb_funcall(rb_cGrnRecord, rb_intern("new"), 3,
43
- table, rb_id, values);
43
+ table, rb_id, values);
44
44
  }
45
45
 
46
46
  void
@@ -30,28 +30,28 @@ VALUE rb_cGrnSnippet;
30
30
 
31
31
  void
32
32
  rb_grn_snippet_finalizer (grn_ctx *context, grn_obj *object,
33
- RbGrnSnippet *rb_grn_snippet)
33
+ RbGrnSnippet *rb_grn_snippet)
34
34
  {
35
35
  rb_grn_context_unregister_floating_object(RB_GRN_OBJECT(rb_grn_snippet));
36
36
  }
37
37
 
38
38
  void
39
39
  rb_grn_snippet_bind (RbGrnSnippet *rb_grn_snippet,
40
- grn_ctx *context, grn_obj *snippet)
40
+ grn_ctx *context, grn_obj *snippet)
41
41
  {
42
42
  }
43
43
 
44
44
  void
45
45
  rb_grn_snippet_deconstruct (RbGrnSnippet *rb_grn_snippet,
46
- grn_obj **snippet,
47
- grn_ctx **context)
46
+ grn_obj **snippet,
47
+ grn_ctx **context)
48
48
  {
49
49
  RbGrnObject *rb_grn_object;
50
50
 
51
51
  rb_grn_object = RB_GRN_OBJECT(rb_grn_snippet);
52
52
  rb_grn_object_deconstruct(rb_grn_object, snippet, context,
53
- NULL, NULL,
54
- NULL, NULL);
53
+ NULL, NULL,
54
+ NULL, NULL);
55
55
  }
56
56
 
57
57
  /*
@@ -112,10 +112,10 @@ rb_grn_snippet_initialize (int argc, VALUE *argv, VALUE self)
112
112
 
113
113
  context = rb_grn_context_ensure(&rb_context);
114
114
  if (!grn_ctx_db(context)) {
115
- rb_raise(rb_eArgError,
116
- "Groonga::Context should be associated with a database by "
117
- "Groonga::Database#open or #create: %s",
118
- rb_grn_inspect(rb_context));
115
+ rb_raise(rb_eArgError,
116
+ "Groonga::Context should be associated with a database by "
117
+ "Groonga::Database#open or #create: %s",
118
+ rb_grn_inspect(rb_context));
119
119
  }
120
120
 
121
121
  if (RVAL2CBOOL(rb_normalize))
@@ -234,9 +234,9 @@ rb_grn_snippet_execute (VALUE self, VALUE rb_string)
234
234
  rb_grn_snippet_deconstruct(SELF(self), &snippet, &context);
235
235
 
236
236
  if (TYPE(rb_string) != T_STRING) {
237
- rb_raise(rb_eGrnInvalidArgument,
238
- "snippet text must be String: <%s>",
239
- rb_grn_inspect(rb_string));
237
+ rb_raise(rb_eGrnInvalidArgument,
238
+ "snippet text must be String: <%s>",
239
+ rb_grn_inspect(rb_string));
240
240
  }
241
241
 
242
242
  #ifdef HAVE_RUBY_ENCODING_H
@@ -257,7 +257,7 @@ rb_grn_snippet_execute (VALUE self, VALUE rb_string)
257
257
  unsigned result_length;
258
258
 
259
259
  rc = grn_snip_get_result(context, (grn_snip *)snippet,
260
- i, result, &result_length);
260
+ i, result, &result_length);
261
261
  rb_grn_rc_check(rc, self);
262
262
  rb_result = rb_grn_context_rb_string_new(context, result, result_length);
263
263
  rb_ary_push(rb_results, rb_result);
@@ -44,13 +44,13 @@ rb_grn_table_cursor_get_key (VALUE self)
44
44
  grn_table_cursor *cursor;
45
45
 
46
46
  rb_grn_table_cursor_deconstruct(SELF(self), &cursor, &context,
47
- NULL, NULL, NULL, NULL);
47
+ NULL, NULL, NULL, NULL);
48
48
  if (context && cursor) {
49
49
  void *key;
50
50
  int key_size;
51
- grn_obj *table;
51
+ grn_obj *table;
52
52
 
53
- table = grn_table_cursor_table(context, cursor);
53
+ table = grn_table_cursor_table(context, cursor);
54
54
  key_size = grn_table_cursor_get_key(context, cursor, &key);
55
55
  rb_key = GRNKEY2RVAL(context, key, key_size, table, self);
56
56
  }
@@ -62,7 +62,7 @@ void
62
62
  rb_grn_init_table_cursor_key_support (VALUE mGrn)
63
63
  {
64
64
  rb_mGrnTableCursorKeySupport =
65
- rb_define_module_under(rb_cGrnTableCursor, "KeySupport");
65
+ rb_define_module_under(rb_cGrnTableCursor, "KeySupport");
66
66
 
67
67
  rb_define_method(rb_mGrnTableCursorKeySupport, "key",
68
68
  rb_grn_table_cursor_get_key, 0);
@@ -35,38 +35,38 @@ rb_grn_table_cursor_from_ruby_object (VALUE object, grn_ctx **context)
35
35
  grn_table_cursor *table_cursor;
36
36
 
37
37
  if (!RVAL2CBOOL(rb_obj_is_kind_of(object, rb_cGrnTableCursor))) {
38
- rb_raise(rb_eTypeError, "not a groonga table cursor");
38
+ rb_raise(rb_eTypeError, "not a groonga table cursor");
39
39
  }
40
40
 
41
41
  rb_grn_table_cursor_deconstruct(SELF(object), &table_cursor, NULL,
42
- NULL, NULL,
43
- NULL, NULL);
42
+ NULL, NULL,
43
+ NULL, NULL);
44
44
  return table_cursor;
45
45
  }
46
46
 
47
47
  VALUE
48
48
  rb_grn_table_cursor_to_ruby_object (VALUE klass, grn_ctx *context,
49
- grn_table_cursor *cursor,
50
- grn_bool owner)
49
+ grn_table_cursor *cursor,
50
+ grn_bool owner)
51
51
  {
52
52
  return GRNOBJECT2RVAL(klass, context, cursor, owner);
53
53
  }
54
54
 
55
55
  void
56
56
  rb_grn_table_cursor_deconstruct (RbGrnTableCursor *rb_grn_table_cursor,
57
- grn_table_cursor **cursor,
58
- grn_ctx **context,
59
- grn_id *domain_id,
60
- grn_obj **domain,
61
- grn_id *range_id,
62
- grn_obj **range)
57
+ grn_table_cursor **cursor,
58
+ grn_ctx **context,
59
+ grn_id *domain_id,
60
+ grn_obj **domain,
61
+ grn_id *range_id,
62
+ grn_obj **range)
63
63
  {
64
64
  RbGrnObject *rb_grn_object;
65
65
 
66
66
  rb_grn_object = RB_GRN_OBJECT(rb_grn_table_cursor);
67
67
  rb_grn_object_deconstruct(rb_grn_object, cursor, context,
68
- domain_id, domain,
69
- range_id, range);
68
+ domain_id, domain,
69
+ range_id, range);
70
70
  }
71
71
 
72
72
  int
@@ -75,17 +75,17 @@ rb_grn_table_cursor_order_to_flag (VALUE rb_order)
75
75
  int flag = 0;
76
76
 
77
77
  if (NIL_P(rb_order) ||
78
- rb_grn_equal_option(rb_order, "asc") ||
79
- rb_grn_equal_option(rb_order, "ascending")) {
80
- flag |= GRN_CURSOR_ASCENDING;
78
+ rb_grn_equal_option(rb_order, "asc") ||
79
+ rb_grn_equal_option(rb_order, "ascending")) {
80
+ flag |= GRN_CURSOR_ASCENDING;
81
81
  } else if (rb_grn_equal_option(rb_order, "desc") ||
82
- rb_grn_equal_option(rb_order, "descending")) {
83
- flag |= GRN_CURSOR_DESCENDING;
82
+ rb_grn_equal_option(rb_order, "descending")) {
83
+ flag |= GRN_CURSOR_DESCENDING;
84
84
  } else {
85
- rb_raise(rb_eArgError,
86
- "order should be one of "
87
- "[:asc, :ascending, :desc, :descending]: %s",
88
- rb_grn_inspect(rb_order));
85
+ rb_raise(rb_eArgError,
86
+ "order should be one of "
87
+ "[:asc, :ascending, :desc, :descending]: %s",
88
+ rb_grn_inspect(rb_order));
89
89
  }
90
90
 
91
91
  return flag;
@@ -93,32 +93,32 @@ rb_grn_table_cursor_order_to_flag (VALUE rb_order)
93
93
 
94
94
  int
95
95
  rb_grn_table_cursor_order_by_to_flag (unsigned char table_type,
96
- VALUE rb_table,
97
- VALUE rb_order_by)
96
+ VALUE rb_table,
97
+ VALUE rb_order_by)
98
98
  {
99
99
  int flag = 0;
100
100
 
101
101
  if (NIL_P(rb_order_by)) {
102
- if (table_type == GRN_TABLE_PAT_KEY) {
103
- flag |= GRN_CURSOR_BY_KEY;
104
- } else {
105
- flag |= GRN_CURSOR_BY_ID;
106
- }
102
+ if (table_type == GRN_TABLE_PAT_KEY) {
103
+ flag |= GRN_CURSOR_BY_KEY;
104
+ } else {
105
+ flag |= GRN_CURSOR_BY_ID;
106
+ }
107
107
  } else if (rb_grn_equal_option(rb_order_by, "id")) {
108
- flag |= GRN_CURSOR_BY_ID;
108
+ flag |= GRN_CURSOR_BY_ID;
109
109
  } else if (rb_grn_equal_option(rb_order_by, "key")) {
110
- if (table_type != GRN_TABLE_PAT_KEY) {
111
- rb_raise(rb_eArgError,
112
- "order_by => :key is available "
113
- "only for Groonga::PatriciaTrie: %s",
114
- rb_grn_inspect(rb_table));
115
- }
116
- flag |= GRN_CURSOR_BY_KEY;
110
+ if (table_type != GRN_TABLE_PAT_KEY) {
111
+ rb_raise(rb_eArgError,
112
+ "order_by => :key is available "
113
+ "only for Groonga::PatriciaTrie: %s",
114
+ rb_grn_inspect(rb_table));
115
+ }
116
+ flag |= GRN_CURSOR_BY_KEY;
117
117
  } else {
118
- rb_raise(rb_eArgError,
119
- "order_by should be one of [:id%s]: %s",
120
- table_type == GRN_TABLE_PAT_KEY ? ", :key" : "",
121
- rb_grn_inspect(rb_order_by));
118
+ rb_raise(rb_eArgError,
119
+ "order_by should be one of [:id%s]: %s",
120
+ table_type == GRN_TABLE_PAT_KEY ? ", :key" : "",
121
+ rb_grn_inspect(rb_order_by));
122
122
  }
123
123
 
124
124
  return flag;
@@ -138,7 +138,7 @@ rb_grn_table_cursor_get_value (VALUE self)
138
138
  VALUE rb_value = Qnil;
139
139
 
140
140
  rb_grn_table_cursor_deconstruct(SELF(self), &cursor, &context,
141
- NULL, NULL, NULL, NULL);
141
+ NULL, NULL, NULL, NULL);
142
142
  if (context && cursor) {
143
143
  int n;
144
144
  void *value;
@@ -163,14 +163,14 @@ rb_grn_table_cursor_set_value (VALUE self, VALUE value)
163
163
  grn_table_cursor *cursor;
164
164
 
165
165
  rb_grn_table_cursor_deconstruct(SELF(self), &cursor, &context,
166
- NULL, NULL, NULL, NULL);
166
+ NULL, NULL, NULL, NULL);
167
167
  if (context && cursor) {
168
168
  grn_rc rc;
169
169
 
170
170
  rc = grn_table_cursor_set_value(context,
171
171
  cursor,
172
172
  StringValuePtr(value),
173
- GRN_OBJ_SET);
173
+ GRN_OBJ_SET);
174
174
  rb_grn_rc_check(rc, self);
175
175
  }
176
176
 
@@ -189,7 +189,7 @@ rb_grn_table_cursor_delete (VALUE self)
189
189
  grn_table_cursor *cursor;
190
190
 
191
191
  rb_grn_table_cursor_deconstruct(SELF(self), &cursor, &context,
192
- NULL, NULL, NULL, NULL);
192
+ NULL, NULL, NULL, NULL);
193
193
  if (context && cursor) {
194
194
  grn_rc rc;
195
195
 
@@ -214,14 +214,14 @@ rb_grn_table_cursor_next (VALUE self)
214
214
  grn_table_cursor *cursor;
215
215
 
216
216
  rb_grn_table_cursor_deconstruct(SELF(self), &cursor, &context,
217
- NULL, NULL, NULL, NULL);
217
+ NULL, NULL, NULL, NULL);
218
218
  if (context && cursor) {
219
219
  grn_id record_id;
220
220
 
221
221
  record_id = grn_table_cursor_next(context, cursor);
222
222
  if (record_id != GRN_ID_NIL) /* FIXME: use grn_table_cursor_table */
223
223
  rb_record = rb_grn_record_new(rb_iv_get(self, "@table"),
224
- record_id, Qnil);
224
+ record_id, Qnil);
225
225
  }
226
226
 
227
227
  return rb_record;
@@ -243,13 +243,13 @@ rb_grn_table_cursor_each (VALUE self)
243
243
  RETURN_ENUMERATOR(self, 0, NULL);
244
244
 
245
245
  rb_grn_table_cursor_deconstruct(SELF(self), &cursor, &context,
246
- NULL, NULL, NULL, NULL);
246
+ NULL, NULL, NULL, NULL);
247
247
 
248
248
  if (context && cursor) {
249
- while ((record_id = grn_table_cursor_next(context, cursor))) {
250
- rb_yield(rb_grn_record_new(rb_iv_get(self, "@table"),
251
- record_id, Qnil));
252
- }
249
+ while ((record_id = grn_table_cursor_next(context, cursor))) {
250
+ rb_yield(rb_grn_record_new(rb_iv_get(self, "@table"),
251
+ record_id, Qnil));
252
+ }
253
253
  }
254
254
 
255
255
  return Qnil;
@@ -31,49 +31,49 @@ VALUE rb_mGrnTableKeySupport;
31
31
 
32
32
  void
33
33
  rb_grn_table_key_support_deconstruct (RbGrnTableKeySupport *rb_grn_table_key_support,
34
- grn_obj **table_key_support,
35
- grn_ctx **context,
36
- grn_obj **key,
37
- grn_id *domain_id,
38
- grn_obj **domain,
39
- grn_obj **value,
40
- grn_id *range_id,
41
- grn_obj **range,
42
- VALUE *columns)
34
+ grn_obj **table_key_support,
35
+ grn_ctx **context,
36
+ grn_obj **key,
37
+ grn_id *domain_id,
38
+ grn_obj **domain,
39
+ grn_obj **value,
40
+ grn_id *range_id,
41
+ grn_obj **range,
42
+ VALUE *columns)
43
43
  {
44
44
  RbGrnTable *rb_grn_table;
45
45
 
46
46
  rb_grn_table = RB_GRN_TABLE(rb_grn_table_key_support);
47
47
 
48
48
  rb_grn_table_deconstruct(rb_grn_table, table_key_support, context,
49
- domain_id, domain,
50
- value, range_id, range,
51
- columns);
49
+ domain_id, domain,
50
+ value, range_id, range,
51
+ columns);
52
52
 
53
53
  if (key)
54
- *key = rb_grn_table_key_support->key;
54
+ *key = rb_grn_table_key_support->key;
55
55
  }
56
56
 
57
57
  void
58
58
  rb_grn_table_key_support_finalizer (grn_ctx *context,
59
- grn_obj *grn_object,
60
- RbGrnTableKeySupport *rb_grn_table_key_support)
59
+ grn_obj *grn_object,
60
+ RbGrnTableKeySupport *rb_grn_table_key_support)
61
61
  {
62
62
  if (!context)
63
- return;
63
+ return;
64
64
 
65
65
  if (rb_grn_table_key_support->key)
66
- grn_obj_unlink(context, rb_grn_table_key_support->key);
66
+ grn_obj_unlink(context, rb_grn_table_key_support->key);
67
67
  rb_grn_table_key_support->key = NULL;
68
68
 
69
69
  rb_grn_table_finalizer(context, grn_object,
70
- RB_GRN_TABLE(rb_grn_table_key_support));
70
+ RB_GRN_TABLE(rb_grn_table_key_support));
71
71
  }
72
72
 
73
73
  void
74
74
  rb_grn_table_key_support_bind (RbGrnTableKeySupport *rb_grn_table_key_support,
75
- grn_ctx *context,
76
- grn_obj *table_key_support)
75
+ grn_ctx *context,
76
+ grn_obj *table_key_support)
77
77
  {
78
78
  RbGrnObject *rb_grn_object;
79
79
  RbGrnTable *rb_grn_table;
@@ -84,7 +84,7 @@ rb_grn_table_key_support_bind (RbGrnTableKeySupport *rb_grn_table_key_support,
84
84
  rb_grn_table_bind(rb_grn_table, context, table_key_support);
85
85
 
86
86
  rb_grn_table_key_support->key =
87
- grn_obj_open(context, GRN_BULK, 0, rb_grn_object->domain_id);
87
+ grn_obj_open(context, GRN_BULK, 0, rb_grn_object->domain_id);
88
88
  }
89
89
 
90
90
  static VALUE
@@ -96,66 +96,66 @@ rb_grn_table_key_support_inspect_content (VALUE self, VALUE inspected)
96
96
 
97
97
  rb_grn_table = SELF(self);
98
98
  if (!rb_grn_table)
99
- return inspected;
99
+ return inspected;
100
100
 
101
101
  rb_grn_table_key_support_deconstruct(SELF(self), &table, &context,
102
- NULL, NULL, NULL,
103
- NULL, NULL, NULL,
104
- NULL);
102
+ NULL, NULL, NULL,
103
+ NULL, NULL, NULL,
104
+ NULL);
105
105
  if (!table)
106
- return inspected;
106
+ return inspected;
107
107
  if (!context)
108
- return inspected;
108
+ return inspected;
109
109
 
110
110
  {
111
- grn_obj value;
112
- grn_encoding encoding;
113
-
114
- rb_str_cat2(inspected, ", ");
115
- rb_str_cat2(inspected, "encoding: <");
116
- GRN_OBJ_INIT(&value, GRN_BULK, 0, GRN_ID_NIL);
117
- grn_obj_get_info(context, table, GRN_INFO_ENCODING, &value);
118
- encoding = *((grn_encoding *)GRN_BULK_HEAD(&value));
119
- grn_obj_unlink(context, &value);
120
-
121
- if (context->rc == GRN_SUCCESS) {
122
- rb_str_concat(inspected, rb_inspect(GRNENCODING2RVAL(encoding)));
123
- } else {
124
- rb_str_cat2(inspected, "invalid");
125
- }
126
-
127
- rb_str_cat2(inspected, ">");
111
+ grn_obj value;
112
+ grn_encoding encoding;
113
+
114
+ rb_str_cat2(inspected, ", ");
115
+ rb_str_cat2(inspected, "encoding: <");
116
+ GRN_OBJ_INIT(&value, GRN_BULK, 0, GRN_ID_NIL);
117
+ grn_obj_get_info(context, table, GRN_INFO_ENCODING, &value);
118
+ encoding = *((grn_encoding *)GRN_BULK_HEAD(&value));
119
+ grn_obj_unlink(context, &value);
120
+
121
+ if (context->rc == GRN_SUCCESS) {
122
+ rb_str_concat(inspected, rb_inspect(GRNENCODING2RVAL(encoding)));
123
+ } else {
124
+ rb_str_cat2(inspected, "invalid");
125
+ }
126
+
127
+ rb_str_cat2(inspected, ">");
128
128
  }
129
129
 
130
130
  {
131
- grn_obj *default_tokenizer;
132
-
133
- rb_str_cat2(inspected, ", ");
134
- rb_str_cat2(inspected, "default_tokenizer: ");
135
- default_tokenizer = grn_obj_get_info(context, table,
136
- GRN_INFO_DEFAULT_TOKENIZER,
137
- NULL);
138
- if (default_tokenizer) {
139
- rb_grn_object_inspect_object_content_name(inspected, context,
140
- default_tokenizer);
141
- } else {
142
- rb_str_cat2(inspected, "(nil)");
143
- }
131
+ grn_obj *default_tokenizer;
132
+
133
+ rb_str_cat2(inspected, ", ");
134
+ rb_str_cat2(inspected, "default_tokenizer: ");
135
+ default_tokenizer = grn_obj_get_info(context, table,
136
+ GRN_INFO_DEFAULT_TOKENIZER,
137
+ NULL);
138
+ if (default_tokenizer) {
139
+ rb_grn_object_inspect_object_content_name(inspected, context,
140
+ default_tokenizer);
141
+ } else {
142
+ rb_str_cat2(inspected, "(nil)");
143
+ }
144
144
  }
145
145
 
146
146
  {
147
- grn_obj *normalizer;
148
-
149
- rb_str_cat2(inspected, ", ");
150
- rb_str_cat2(inspected, "normalizer: ");
151
- normalizer = grn_obj_get_info(context, table, GRN_INFO_NORMALIZER,
152
- NULL);
153
- if (normalizer) {
154
- rb_grn_object_inspect_object_content_name(inspected, context,
155
- normalizer);
156
- } else {
157
- rb_str_cat2(inspected, "(nil)");
158
- }
147
+ grn_obj *normalizer;
148
+
149
+ rb_str_cat2(inspected, ", ");
150
+ rb_str_cat2(inspected, "normalizer: ");
151
+ normalizer = grn_obj_get_info(context, table, GRN_INFO_NORMALIZER,
152
+ NULL);
153
+ if (normalizer) {
154
+ rb_grn_object_inspect_object_content_name(inspected, context,
155
+ normalizer);
156
+ } else {
157
+ rb_str_cat2(inspected, "(nil)");
158
+ }
159
159
  }
160
160
 
161
161
  return inspected;
@@ -191,9 +191,9 @@ rb_grn_table_key_support_add_raw (VALUE self, VALUE rb_key, int *added)
191
191
  grn_obj *key, *domain;
192
192
 
193
193
  rb_grn_table_key_support_deconstruct(SELF(self), &table, &context,
194
- &key, &domain_id, &domain,
195
- NULL, NULL, NULL,
196
- NULL);
194
+ &key, &domain_id, &domain,
195
+ NULL, NULL, NULL,
196
+ NULL);
197
197
 
198
198
  GRN_BULK_REWIND(key);
199
199
  RVAL2GRNKEY(rb_key, context, key, domain_id, domain, self);
@@ -231,13 +231,13 @@ rb_grn_table_key_support_add (int argc, VALUE *argv, VALUE self)
231
231
  rb_scan_args(argc, argv, "11", &key, &values);
232
232
  id = rb_grn_table_key_support_add_raw(self, key, &added);
233
233
  if (GRN_ID_NIL == id) {
234
- return Qnil;
234
+ return Qnil;
235
235
  } else {
236
- if (added) {
237
- return rb_grn_record_new_added(self, id, values);
238
- } else {
239
- return rb_grn_record_new(self, id, values);
240
- }
236
+ if (added) {
237
+ return rb_grn_record_new_added(self, id, values);
238
+ } else {
239
+ return rb_grn_record_new(self, id, values);
240
+ }
241
241
  }
242
242
  }
243
243
 
@@ -249,9 +249,9 @@ rb_grn_table_key_support_get (VALUE self, VALUE rb_key)
249
249
  grn_id id, domain_id;
250
250
 
251
251
  rb_grn_table_key_support_deconstruct(SELF(self), &table, &context,
252
- &key, &domain_id, &domain,
253
- NULL, NULL, NULL,
254
- NULL);
252
+ &key, &domain_id, &domain,
253
+ NULL, NULL, NULL,
254
+ NULL);
255
255
 
256
256
  GRN_BULK_REWIND(key);
257
257
  RVAL2GRNKEY(rb_key, context, key, domain_id, domain, self);
@@ -280,16 +280,16 @@ rb_grn_table_key_support_get_id (int argc, VALUE *argv, VALUE self)
280
280
 
281
281
  rb_scan_args(argc, argv, "01", &rb_key);
282
282
  if (NIL_P(rb_key)) {
283
- return rb_grn_object_get_id(self);
283
+ return rb_grn_object_get_id(self);
284
284
  } else {
285
- grn_id id;
286
-
287
- id = rb_grn_table_key_support_get(self, rb_key);
288
- if (id == GRN_ID_NIL) {
289
- return Qnil;
290
- } else {
291
- return UINT2NUM(id);
292
- }
285
+ grn_id id;
286
+
287
+ id = rb_grn_table_key_support_get(self, rb_key);
288
+ if (id == GRN_ID_NIL) {
289
+ return Qnil;
290
+ } else {
291
+ return UINT2NUM(id);
292
+ }
293
293
  }
294
294
  }
295
295
 
@@ -309,20 +309,20 @@ rb_grn_table_key_support_get_key (VALUE self, VALUE rb_id)
309
309
  VALUE rb_key;
310
310
 
311
311
  rb_grn_table_key_support_deconstruct(SELF(self), &table, &context,
312
- &key, NULL, NULL,
313
- NULL, NULL, NULL,
314
- NULL);
312
+ &key, NULL, NULL,
313
+ NULL, NULL, NULL,
314
+ NULL);
315
315
 
316
316
  id = NUM2UINT(rb_id);
317
317
  GRN_BULK_REWIND(key);
318
318
  key_size = grn_table_get_key(context, table, id,
319
- GRN_BULK_HEAD(key), GRN_BULK_VSIZE(key));
319
+ GRN_BULK_HEAD(key), GRN_BULK_VSIZE(key));
320
320
  if (key_size == 0)
321
- return Qnil;
321
+ return Qnil;
322
322
 
323
323
  if (GRN_BULK_VSIZE(key) < key_size) {
324
- grn_bulk_reserve(context, key, key_size);
325
- grn_table_get_key(context, table, id, GRN_BULK_HEAD(key), key_size);
324
+ grn_bulk_reserve(context, key, key_size);
325
+ grn_table_get_key(context, table, id, GRN_BULK_HEAD(key), key_size);
326
326
  }
327
327
 
328
328
  rb_key = GRNKEY2RVAL(context, GRN_BULK_HEAD(key), key_size, table, self);
@@ -342,9 +342,9 @@ rb_grn_table_key_support_has_key (VALUE self, VALUE rb_key)
342
342
  grn_id id, domain_id;
343
343
 
344
344
  rb_grn_table_key_support_deconstruct(SELF(self), &table, &context,
345
- &key, &domain_id, &domain,
346
- NULL, NULL, NULL,
347
- NULL);
345
+ &key, &domain_id, &domain,
346
+ NULL, NULL, NULL,
347
+ NULL);
348
348
 
349
349
  GRN_BULK_REWIND(key);
350
350
  RVAL2GRNKEY(rb_key, context, key, domain_id, domain, self);
@@ -363,14 +363,14 @@ rb_grn_table_key_support_delete_by_key (VALUE self, VALUE rb_key)
363
363
  grn_rc rc;
364
364
 
365
365
  rb_grn_table_key_support_deconstruct(SELF(self), &table, &context,
366
- &key, &domain_id, &domain,
367
- NULL, NULL, NULL,
368
- NULL);
366
+ &key, &domain_id, &domain,
367
+ NULL, NULL, NULL,
368
+ NULL);
369
369
 
370
370
  GRN_BULK_REWIND(key);
371
371
  RVAL2GRNKEY(rb_key, context, key, domain_id, domain, self);
372
372
  rc = grn_table_delete(context, table,
373
- GRN_BULK_HEAD(key), GRN_BULK_VSIZE(key));
373
+ GRN_BULK_HEAD(key), GRN_BULK_VSIZE(key));
374
374
  rb_grn_context_check(context, self);
375
375
  rb_grn_rc_check(rc, self);
376
376
 
@@ -408,14 +408,14 @@ rb_grn_table_key_support_delete (int argc, VALUE *argv, VALUE self)
408
408
  VALUE rb_id_or_key;
409
409
 
410
410
  if (rb_block_given_p()) {
411
- return rb_grn_table_delete_by_expression(self);
411
+ return rb_grn_table_delete_by_expression(self);
412
412
  }
413
413
 
414
414
  rb_scan_args(argc, argv, "1", &rb_id_or_key);
415
415
  if (FIXNUM_P(rb_id_or_key)) {
416
- return rb_grn_table_delete_by_id(self, rb_id_or_key);
416
+ return rb_grn_table_delete_by_id(self, rb_id_or_key);
417
417
  } else {
418
- return rb_grn_table_key_support_delete_by_key(self, rb_id_or_key);
418
+ return rb_grn_table_key_support_delete_by_key(self, rb_id_or_key);
419
419
  }
420
420
  }
421
421
 
@@ -434,9 +434,9 @@ rb_grn_table_key_support_array_reference (VALUE self, VALUE rb_key)
434
434
 
435
435
  id = rb_grn_table_key_support_get(self, rb_key);
436
436
  if (id == GRN_ID_NIL) {
437
- return Qnil;
437
+ return Qnil;
438
438
  } else {
439
- return rb_grn_record_new(self, id, Qnil);
439
+ return rb_grn_record_new(self, id, Qnil);
440
440
  }
441
441
  }
442
442
 
@@ -459,14 +459,14 @@ set_value (VALUE args, SetValueData *data)
459
459
 
460
460
  rb_column = rb_grn_table_get_column(data->self, rb_name);
461
461
  if (NIL_P(rb_column)) {
462
- rb_raise(rb_eGrnNoSuchColumn,
463
- "no such column: <%s>: <%s>",
464
- rb_grn_inspect(rb_name), rb_grn_inspect(data->self));
462
+ rb_raise(rb_eGrnNoSuchColumn,
463
+ "no such column: <%s>: <%s>",
464
+ rb_grn_inspect(rb_name), rb_grn_inspect(data->self));
465
465
  }
466
466
 
467
467
  rb_grn_object = RB_GRN_OBJECT(DATA_PTR(rb_column));
468
468
  return rb_grn_object_set_raw(rb_grn_object,
469
- data->id, rb_value, GRN_OBJ_SET, data->self);
469
+ data->id, rb_value, GRN_OBJ_SET, data->self);
470
470
  }
471
471
 
472
472
  /*
@@ -488,16 +488,16 @@ rb_grn_table_key_support_array_set (VALUE self, VALUE rb_key, VALUE rb_values)
488
488
  grn_obj *table;
489
489
 
490
490
  rb_grn_table_key_support_deconstruct(SELF(self), &table, &context,
491
- NULL, NULL, NULL,
492
- NULL, NULL, NULL,
493
- NULL);
491
+ NULL, NULL, NULL,
492
+ NULL, NULL, NULL,
493
+ NULL);
494
494
 
495
495
  id = rb_grn_table_key_support_add_raw(self, rb_key, NULL);
496
496
 
497
497
  if (id == GRN_ID_NIL) {
498
- rb_raise(rb_eGrnError,
499
- "failed to add record: %s",
500
- rb_grn_inspect(rb_ary_new3(3, self, rb_key, rb_values)));
498
+ rb_raise(rb_eGrnError,
499
+ "failed to add record: %s",
500
+ rb_grn_inspect(rb_ary_new3(3, self, rb_key, rb_values)));
501
501
  }
502
502
 
503
503
  data.self = self;
@@ -523,26 +523,26 @@ rb_grn_table_key_support_set_column_value (int argc, VALUE *argv, VALUE self)
523
523
  VALUE rb_key, rb_id_or_key, rb_name, rb_value, rb_options;
524
524
 
525
525
  rb_scan_args(argc, argv, "31",
526
- &rb_id_or_key, &rb_name, &rb_value, &rb_options);
526
+ &rb_id_or_key, &rb_name, &rb_value, &rb_options);
527
527
  if (!NIL_P(rb_options)) {
528
- VALUE rb_option_id;
529
- rb_grn_scan_options(rb_options,
530
- "id", &rb_option_id,
531
- NULL);
532
- if (RVAL2CBOOL(rb_option_id)) {
533
- VALUE rb_id = rb_id_or_key;
534
- return rb_grn_table_set_column_value(self, rb_id, rb_name, rb_value);
535
- }
528
+ VALUE rb_option_id;
529
+ rb_grn_scan_options(rb_options,
530
+ "id", &rb_option_id,
531
+ NULL);
532
+ if (RVAL2CBOOL(rb_option_id)) {
533
+ VALUE rb_id = rb_id_or_key;
534
+ return rb_grn_table_set_column_value(self, rb_id, rb_name, rb_value);
535
+ }
536
536
  }
537
537
 
538
538
  rb_key = rb_id_or_key;
539
539
  id = rb_grn_table_key_support_add_raw(self, rb_key, NULL);
540
540
  if (id == GRN_ID_NIL) {
541
- rb_raise(rb_eGrnError,
542
- "failed to add record: %s",
543
- rb_grn_inspect(rb_ary_new3(4,
544
- self, rb_key,
545
- rb_name, rb_value)));
541
+ rb_raise(rb_eGrnError,
542
+ "failed to add record: %s",
543
+ rb_grn_inspect(rb_ary_new3(4,
544
+ self, rb_key,
545
+ rb_name, rb_value)));
546
546
  }
547
547
 
548
548
  return rb_grn_table_set_column_value_raw(self, id, rb_name, rb_value);
@@ -564,20 +564,20 @@ rb_grn_table_key_support_get_column_value (int argc, VALUE *argv, VALUE self)
564
564
 
565
565
  rb_scan_args(argc, argv, "21", &rb_id_or_key, &rb_name, &rb_options);
566
566
  if (!NIL_P(rb_options)) {
567
- VALUE rb_option_id;
568
- rb_grn_scan_options(rb_options,
569
- "id", &rb_option_id,
570
- NULL);
571
- if (RVAL2CBOOL(rb_option_id)) {
572
- VALUE rb_id = rb_id_or_key;
573
- return rb_grn_table_get_column_value(self, rb_id, rb_name);
574
- }
567
+ VALUE rb_option_id;
568
+ rb_grn_scan_options(rb_options,
569
+ "id", &rb_option_id,
570
+ NULL);
571
+ if (RVAL2CBOOL(rb_option_id)) {
572
+ VALUE rb_id = rb_id_or_key;
573
+ return rb_grn_table_get_column_value(self, rb_id, rb_name);
574
+ }
575
575
  }
576
576
 
577
577
  rb_key = rb_id_or_key;
578
578
  id = rb_grn_table_key_support_get(self, rb_key);
579
579
  if (id == GRN_ID_NIL) {
580
- return Qnil;
580
+ return Qnil;
581
581
  }
582
582
 
583
583
  return rb_grn_table_get_column_value_raw(self, id, rb_name);
@@ -593,12 +593,12 @@ rb_grn_table_key_support_get_value_by_key (VALUE self, VALUE rb_key)
593
593
  id = rb_grn_table_key_support_get(self, rb_key);
594
594
 
595
595
  if (id == GRN_ID_NIL)
596
- return Qnil;
596
+ return Qnil;
597
597
 
598
598
  rb_grn_table_key_support_deconstruct(SELF(self), &table, &context,
599
- NULL, NULL, NULL,
600
- &value, NULL, &range,
601
- NULL);
599
+ NULL, NULL, NULL,
600
+ &value, NULL, &range,
601
+ NULL);
602
602
  GRN_BULK_REWIND(value);
603
603
  grn_obj_get_value(context, table, id, value);
604
604
  rb_grn_context_check(context, self);
@@ -622,26 +622,26 @@ rb_grn_table_key_support_get_value (int argc, VALUE *argv, VALUE self)
622
622
  rb_scan_args(argc, argv, "11", &rb_id_or_key, &rb_options);
623
623
 
624
624
  if (NIL_P(rb_options)) {
625
- use_key = GRN_TRUE;
625
+ use_key = GRN_TRUE;
626
626
  } else {
627
- VALUE rb_option_id;
627
+ VALUE rb_option_id;
628
628
 
629
- rb_grn_scan_options(rb_options,
630
- "id", &rb_option_id,
631
- NULL);
632
- use_key = !RVAL2CBOOL(rb_option_id);
629
+ rb_grn_scan_options(rb_options,
630
+ "id", &rb_option_id,
631
+ NULL);
632
+ use_key = !RVAL2CBOOL(rb_option_id);
633
633
  }
634
634
 
635
635
  if (use_key) {
636
- return rb_grn_table_key_support_get_value_by_key(self, rb_id_or_key);
636
+ return rb_grn_table_key_support_get_value_by_key(self, rb_id_or_key);
637
637
  } else {
638
- return rb_grn_table_get_value(self, rb_id_or_key);
638
+ return rb_grn_table_get_value(self, rb_id_or_key);
639
639
  }
640
640
  }
641
641
 
642
642
  static VALUE
643
643
  rb_grn_table_key_support_set_value_by_key (VALUE self,
644
- VALUE rb_key, VALUE rb_value)
644
+ VALUE rb_key, VALUE rb_value)
645
645
  {
646
646
  grn_ctx *context;
647
647
  grn_obj *table;
@@ -650,21 +650,21 @@ rb_grn_table_key_support_set_value_by_key (VALUE self,
650
650
  grn_rc rc;
651
651
 
652
652
  if (NIL_P(rb_key)) {
653
- rb_raise(rb_eArgError, "key should not be nil: <%s>",
654
- rb_grn_inspect(self));
653
+ rb_raise(rb_eArgError, "key should not be nil: <%s>",
654
+ rb_grn_inspect(self));
655
655
  }
656
656
 
657
657
  rb_grn_table_key_support_deconstruct(SELF(self), &table, &context,
658
- NULL, NULL, NULL,
659
- &value, NULL, NULL,
660
- NULL);
658
+ NULL, NULL, NULL,
659
+ &value, NULL, NULL,
660
+ NULL);
661
661
 
662
662
  id = rb_grn_table_key_support_add_raw(self, rb_key, NULL);
663
663
  if (GRN_ID_NIL == id) {
664
- rb_raise(rb_eGrnError,
665
- "failed to add new record with key: <%s>: <%s>",
666
- rb_grn_inspect(rb_key),
667
- rb_grn_inspect(self));
664
+ rb_raise(rb_eGrnError,
665
+ "failed to add new record with key: <%s>: <%s>",
666
+ rb_grn_inspect(rb_key),
667
+ rb_grn_inspect(self));
668
668
  }
669
669
 
670
670
  GRN_BULK_REWIND(value);
@@ -692,22 +692,22 @@ rb_grn_table_key_support_set_value (int argc, VALUE *argv, VALUE self)
692
692
  rb_scan_args(argc, argv, "21", &rb_id_or_key, &rb_value, &rb_options);
693
693
 
694
694
  if (NIL_P(rb_options)) {
695
- use_key = GRN_TRUE;
695
+ use_key = GRN_TRUE;
696
696
  } else {
697
- VALUE rb_option_id;
697
+ VALUE rb_option_id;
698
698
 
699
- rb_grn_scan_options(rb_options,
700
- "id", &rb_option_id,
701
- NULL);
702
- use_key = !RVAL2CBOOL(rb_option_id);
699
+ rb_grn_scan_options(rb_options,
700
+ "id", &rb_option_id,
701
+ NULL);
702
+ use_key = !RVAL2CBOOL(rb_option_id);
703
703
  }
704
704
 
705
705
  if (use_key) {
706
- return rb_grn_table_key_support_set_value_by_key(self,
707
- rb_id_or_key,
708
- rb_value);
706
+ return rb_grn_table_key_support_set_value_by_key(self,
707
+ rb_id_or_key,
708
+ rb_value);
709
709
  } else {
710
- return rb_grn_table_set_value(self, rb_id_or_key, rb_value);
710
+ return rb_grn_table_set_value(self, rb_id_or_key, rb_value);
711
711
  }
712
712
  }
713
713
 
@@ -725,12 +725,12 @@ rb_grn_table_key_support_get_default_tokenizer (VALUE self)
725
725
  grn_obj *tokenizer = NULL;
726
726
 
727
727
  rb_grn_table_key_support_deconstruct(SELF(self), &table, &context,
728
- NULL, NULL, NULL,
729
- NULL, NULL, NULL,
730
- NULL);
728
+ NULL, NULL, NULL,
729
+ NULL, NULL, NULL,
730
+ NULL);
731
731
 
732
732
  tokenizer = grn_obj_get_info(context, table, GRN_INFO_DEFAULT_TOKENIZER,
733
- NULL);
733
+ NULL);
734
734
  rb_grn_context_check(context, self);
735
735
 
736
736
  return GRNOBJECT2RVAL(Qnil, context, tokenizer, GRN_FALSE);
@@ -766,13 +766,13 @@ rb_grn_table_key_support_set_default_tokenizer (VALUE self, VALUE rb_tokenizer)
766
766
  grn_rc rc;
767
767
 
768
768
  rb_grn_table_key_support_deconstruct(SELF(self), &table, &context,
769
- NULL, NULL, NULL,
770
- NULL, NULL, NULL,
771
- NULL);
769
+ NULL, NULL, NULL,
770
+ NULL, NULL, NULL,
771
+ NULL);
772
772
 
773
773
  tokenizer = RVAL2GRNOBJECT(rb_tokenizer, &context);
774
774
  rc = grn_obj_set_info(context, table,
775
- GRN_INFO_DEFAULT_TOKENIZER, tokenizer);
775
+ GRN_INFO_DEFAULT_TOKENIZER, tokenizer);
776
776
  rb_grn_context_check(context, self);
777
777
  rb_grn_rc_check(rc, self);
778
778
 
@@ -793,9 +793,9 @@ rb_grn_table_key_support_get_normalizer (VALUE self)
793
793
  grn_obj *normalizer = NULL;
794
794
 
795
795
  rb_grn_table_key_support_deconstruct(SELF(self), &table, &context,
796
- NULL, NULL, NULL,
797
- NULL, NULL, NULL,
798
- NULL);
796
+ NULL, NULL, NULL,
797
+ NULL, NULL, NULL,
798
+ NULL);
799
799
 
800
800
  normalizer = grn_obj_get_info(context, table, GRN_INFO_NORMALIZER, NULL);
801
801
  rb_grn_context_check(context, self);
@@ -832,9 +832,9 @@ rb_grn_table_key_support_set_normalizer (VALUE self, VALUE rb_normalizer)
832
832
  grn_rc rc;
833
833
 
834
834
  rb_grn_table_key_support_deconstruct(SELF(self), &table, &context,
835
- NULL, NULL, NULL,
836
- NULL, NULL, NULL,
837
- NULL);
835
+ NULL, NULL, NULL,
836
+ NULL, NULL, NULL,
837
+ NULL);
838
838
 
839
839
  normalizer = RVAL2GRNOBJECT(rb_normalizer, &context);
840
840
  rc = grn_obj_set_info(context, table, GRN_INFO_NORMALIZER, normalizer);
@@ -871,9 +871,9 @@ rb_grn_table_key_support_support_key_p (VALUE self)
871
871
  grn_obj *table;
872
872
 
873
873
  rb_grn_table_key_support_deconstruct(SELF(self), &table, NULL,
874
- NULL, NULL, NULL,
875
- NULL, NULL, NULL,
876
- NULL);
874
+ NULL, NULL, NULL,
875
+ NULL, NULL, NULL,
876
+ NULL);
877
877
  return table->header.domain == GRN_ID_NIL ? Qfalse : Qtrue;
878
878
  }
879
879
 
@@ -884,48 +884,48 @@ rb_grn_init_table_key_support (VALUE mGrn)
884
884
  rb_include_module(rb_mGrnTableKeySupport, rb_mGrnEncodingSupport);
885
885
 
886
886
  rb_define_method(rb_mGrnTableKeySupport, "inspect",
887
- rb_grn_table_key_support_inspect, 0);
887
+ rb_grn_table_key_support_inspect, 0);
888
888
 
889
889
  rb_define_method(rb_mGrnTableKeySupport, "add",
890
- rb_grn_table_key_support_add, -1);
890
+ rb_grn_table_key_support_add, -1);
891
891
  rb_define_method(rb_mGrnTableKeySupport, "id",
892
- rb_grn_table_key_support_get_id, -1);
892
+ rb_grn_table_key_support_get_id, -1);
893
893
  rb_define_method(rb_mGrnTableKeySupport, "key",
894
- rb_grn_table_key_support_get_key, 1);
894
+ rb_grn_table_key_support_get_key, 1);
895
895
  rb_define_method(rb_mGrnTableKeySupport, "has_key?",
896
- rb_grn_table_key_support_has_key, 1);
896
+ rb_grn_table_key_support_has_key, 1);
897
897
 
898
898
  rb_define_method(rb_mGrnTableKeySupport, "delete",
899
- rb_grn_table_key_support_delete, -1);
899
+ rb_grn_table_key_support_delete, -1);
900
900
 
901
901
  rb_define_method(rb_mGrnTableKeySupport, "[]",
902
- rb_grn_table_key_support_array_reference, 1);
902
+ rb_grn_table_key_support_array_reference, 1);
903
903
  rb_define_method(rb_mGrnTableKeySupport, "[]=",
904
- rb_grn_table_key_support_array_set, 2);
904
+ rb_grn_table_key_support_array_set, 2);
905
905
 
906
906
  rb_define_method(rb_mGrnTableKeySupport, "column_value",
907
- rb_grn_table_key_support_get_column_value, -1);
907
+ rb_grn_table_key_support_get_column_value, -1);
908
908
  rb_define_method(rb_mGrnTableKeySupport, "set_column_value",
909
- rb_grn_table_key_support_set_column_value, -1);
909
+ rb_grn_table_key_support_set_column_value, -1);
910
910
 
911
911
  rb_define_method(rb_mGrnTableKeySupport, "value",
912
- rb_grn_table_key_support_get_value, -1);
912
+ rb_grn_table_key_support_get_value, -1);
913
913
  rb_define_method(rb_mGrnTableKeySupport, "set_value",
914
- rb_grn_table_key_support_set_value, -1);
914
+ rb_grn_table_key_support_set_value, -1);
915
915
 
916
916
  rb_define_method(rb_mGrnTableKeySupport, "default_tokenizer",
917
- rb_grn_table_key_support_get_default_tokenizer, 0);
917
+ rb_grn_table_key_support_get_default_tokenizer, 0);
918
918
  rb_define_method(rb_mGrnTableKeySupport, "default_tokenizer=",
919
- rb_grn_table_key_support_set_default_tokenizer, 1);
919
+ rb_grn_table_key_support_set_default_tokenizer, 1);
920
920
 
921
921
  rb_define_method(rb_mGrnTableKeySupport, "normalizer",
922
- rb_grn_table_key_support_get_normalizer, 0);
922
+ rb_grn_table_key_support_get_normalizer, 0);
923
923
  rb_define_method(rb_mGrnTableKeySupport, "normalizer=",
924
- rb_grn_table_key_support_set_normalizer, 1);
924
+ rb_grn_table_key_support_set_normalizer, 1);
925
925
 
926
926
  rb_define_method(rb_mGrnTableKeySupport, "normalize_key?",
927
- rb_grn_table_key_support_normalize_key_p, 0);
927
+ rb_grn_table_key_support_normalize_key_p, 0);
928
928
 
929
929
  rb_define_method(rb_mGrnTableKeySupport, "support_key?",
930
- rb_grn_table_key_support_support_key_p, 0);
930
+ rb_grn_table_key_support_support_key_p, 0);
931
931
  }