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

Back to archive index

Kouhei Sutou kous****@users*****
2006年 11月 30日 (木) 11:53:15 JST


Index: tomoe/ext/ruby/tomoe-rb-char.c
diff -u tomoe/ext/ruby/tomoe-rb-char.c:1.8 tomoe/ext/ruby/tomoe-rb-char.c:1.9
--- tomoe/ext/ruby/tomoe-rb-char.c:1.8	Thu Nov 30 11:22:31 2006
+++ tomoe/ext/ruby/tomoe-rb-char.c	Thu Nov 30 11:53:15 2006
@@ -36,13 +36,22 @@
 static VALUE
 tc_get_radicals(VALUE self)
 {
-    return GLIST2ARY((GList *)tomoe_char_get_radicals(_SELF(self)));
+    VALUE radicals;
+    const GList *node;
+
+    radicals = rb_ary_new ();
+    for (node = tomoe_char_get_radicals(_SELF(self));
+         node;
+         node = g_list_next (node)) {
+        rb_ary_push (radicals, CSTR2RVAL (node->data));
+    }
+    return radicals;
 }
 
 static VALUE
 tc_add_radical(VALUE self, VALUE radical)
 {
-    tomoe_char_add_radical(_SELF(self), RVAL2TCHR(radical));
+    tomoe_char_add_radical(_SELF(self), RVAL2CSTR(radical));
     return Qnil;
 }
 


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