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

Back to archive index

Kouhei Sutou kous****@users*****
2006年 11月 27日 (月) 16:05:51 JST


Index: tomoe/ext/ruby/tomoe-rb-char.c
diff -u tomoe/ext/ruby/tomoe-rb-char.c:1.5 tomoe/ext/ruby/tomoe-rb-char.c:1.6
--- tomoe/ext/ruby/tomoe-rb-char.c:1.5	Mon Nov 27 15:54:25 2006
+++ tomoe/ext/ruby/tomoe-rb-char.c	Mon Nov 27 16:05:51 2006
@@ -3,15 +3,15 @@
 #define _SELF(obj) (TOMOE_CHAR(RVAL2GOBJ(obj)))
 
 static VALUE
-tc_get_code(VALUE self)
+tc_get_utf8(VALUE self)
 {
-    return CSTR2RVAL(tomoe_char_get_code(_SELF(self)));
+    return CSTR2RVAL(tomoe_char_get_utf8(_SELF(self)));
 }
 
 static VALUE
-tc_set_code(VALUE self, VALUE code)
+tc_set_utf8(VALUE self, VALUE utf8)
 {
-    tomoe_char_set_code(_SELF(self), RVAL2CSTR(code));
+    tomoe_char_set_utf8(_SELF(self), RVAL2CSTR(utf8));
     return Qnil;
 }
 
@@ -58,8 +58,8 @@
 
     cTomoeChar = G_DEF_CLASS(TOMOE_TYPE_CHAR, "Char", mTomoe);
 
-    rb_define_method(cTomoeChar, "code", tc_get_code, 0);
-    rb_define_method(cTomoeChar, "code=", tc_set_code, 1);
+    rb_define_method(cTomoeChar, "utf8", tc_get_utf8, 0);
+    rb_define_method(cTomoeChar, "utf8=", tc_set_utf8, 1);
     rb_define_method(cTomoeChar, "n_strokes", tc_get_n_strokes, 0);
     rb_define_method(cTomoeChar, "n_strokes=", tc_set_n_strokes, 1);
     rb_define_method(cTomoeChar, "writing", tc_get_writing, 0);


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