[macruby-changes] [1010] MacRuby/branches/experimental/object.c
source_changes at macosforge.org
source_changes at macosforge.org
Thu Mar 19 23:50:17 PDT 2009
Revision: 1010
http://trac.macosforge.org/projects/ruby/changeset/1010
Author: lsansonetti at apple.com
Date: 2009-03-19 23:50:16 -0700 (Thu, 19 Mar 2009)
Log Message:
-----------
ported Kernel#Integer/Float/String/Array to rb_objc_define_method()
Modified Paths:
--------------
MacRuby/branches/experimental/object.c
Modified: MacRuby/branches/experimental/object.c
===================================================================
--- MacRuby/branches/experimental/object.c 2009-03-20 06:45:02 UTC (rev 1009)
+++ MacRuby/branches/experimental/object.c 2009-03-20 06:50:16 UTC (rev 1010)
@@ -2323,7 +2323,7 @@
*/
static VALUE
-rb_f_integer(VALUE obj, VALUE arg)
+rb_f_integer(VALUE obj, SEL sel, VALUE arg)
{
return rb_Integer(arg);
}
@@ -2461,7 +2461,7 @@
*/
static VALUE
-rb_f_float(VALUE obj, VALUE arg)
+rb_f_float(VALUE obj, SEL sel, VALUE arg)
{
return rb_Float(arg);
}
@@ -2519,7 +2519,7 @@
*/
static VALUE
-rb_f_string(VALUE obj, VALUE arg)
+rb_f_string(VALUE obj, SEL sel, VALUE arg)
{
return rb_String(arg);
}
@@ -2549,7 +2549,7 @@
*/
static VALUE
-rb_f_array(VALUE obj, VALUE arg)
+rb_f_array(VALUE obj, SEL sel, VALUE arg)
{
return rb_Array(arg);
}
@@ -2750,11 +2750,11 @@
rb_objc_define_method(rb_mKernel, "sprintf", rb_f_sprintf_imp, -1); /* in sprintf.c */
rb_objc_define_method(rb_mKernel, "format", rb_f_sprintf_imp, -1); /* in sprintf.c */
- rb_define_global_function("Integer", rb_f_integer, 1);
- rb_define_global_function("Float", rb_f_float, 1);
+ rb_objc_define_method(rb_mKernel, "Integer", rb_f_integer, 1);
+ rb_objc_define_method(rb_mKernel, "Float", rb_f_float, 1);
- rb_define_global_function("String", rb_f_string, 1);
- rb_define_global_function("Array", rb_f_array, 1);
+ rb_objc_define_method(rb_mKernel, "String", rb_f_string, 1);
+ rb_objc_define_method(rb_mKernel, "Array", rb_f_array, 1);
rb_const_set(rb_cObject, rb_intern("NSNull"), (VALUE)objc_getClass("NSNull"));
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090319/e654d68f/attachment.html>
More information about the macruby-changes
mailing list