[Tomoe-cvs 1558] CVS update: tomoe/ext/ruby

Back to archive index

Kouhei Sutou kous****@users*****
2006年 12月 4日 (月) 00:04:42 JST


Index: tomoe/ext/ruby/tomoe-rb-dict.c
diff -u tomoe/ext/ruby/tomoe-rb-dict.c:1.12 tomoe/ext/ruby/tomoe-rb-dict.c:1.13
--- tomoe/ext/ruby/tomoe-rb-dict.c:1.12	Fri Dec  1 14:27:16 2006
+++ tomoe/ext/ruby/tomoe-rb-dict.c	Mon Dec  4 00:04:42 2006
@@ -45,6 +45,14 @@
                               "database_name", RVAL2CSTR(database_name),
                               "editable", RVAL2CBOOL(editable),
                               NULL);
+    } else if (strcmp(name, "unihan") == 0) {
+        VALUE rb_dict_name;
+        gchar *dict_name;
+
+        rb_dict_name = rb_hash_aref(props, CSTR2RVAL("name"));
+        dict_name = NIL_P(rb_dict_name) ? NULL : RVAL2CSTR(rb_dict_name);
+
+        dict = tomoe_dict_new(name, "name", dict_name, NULL);
     } else {
         rb_raise(rb_eArgError, "unknown dictionary type: %s", name);
         dict = NULL;


tomoe-cvs メーリングリストの案内
Back to archive index