Kouhei Sutou
kous****@users*****
2006年 11月 30日 (木) 16:46:02 JST
Index: tomoe/ext/ruby/tomoe-rb-dict.c diff -u tomoe/ext/ruby/tomoe-rb-dict.c:1.10 tomoe/ext/ruby/tomoe-rb-dict.c:1.11 --- tomoe/ext/ruby/tomoe-rb-dict.c:1.10 Thu Nov 30 15:40:32 2006 +++ tomoe/ext/ruby/tomoe-rb-dict.c Thu Nov 30 16:46:02 2006 @@ -66,6 +66,12 @@ } static VALUE +td_search(VALUE self, VALUE query) +{ + return GLIST2ARYF(tomoe_dict_search(_SELF(self), RVAL2TQRY(query))); +} + +static VALUE td_flush(VALUE self) { return CBOOL2RVAL(tomoe_dict_flush(_SELF(self))); @@ -87,5 +93,7 @@ rb_define_method(cTomoeDict, "register", td_register_char, 1); rb_define_method(cTomoeDict, "unregister", td_unregister_char, 1); + rb_define_method(cTomoeDict, "search", td_search, 1); + rb_define_method(cTomoeDict, "flush", td_flush, 0); }