[macruby-changes] [404] MacRuby/branches/lrz_unstable

source_changes at macosforge.org source_changes at macosforge.org
Sun Aug 3 14:08:32 PDT 2008


Revision: 404
          http://trac.macosforge.org/projects/ruby/changeset/404
Author:   lsansonetti at apple.com
Date:     2008-08-03 14:08:32 -0700 (Sun, 03 Aug 2008)
Log Message:
-----------
re-define alloc on primitive subclasses

Modified Paths:
--------------
    MacRuby/branches/lrz_unstable/array.c
    MacRuby/branches/lrz_unstable/hash.c
    MacRuby/branches/lrz_unstable/string.c

Modified: MacRuby/branches/lrz_unstable/array.c
===================================================================
--- MacRuby/branches/lrz_unstable/array.c	2008-08-03 19:10:34 UTC (rev 403)
+++ MacRuby/branches/lrz_unstable/array.c	2008-08-03 21:08:32 UTC (rev 404)
@@ -4111,6 +4111,8 @@
 	class_addMethod(klass, sel_registerName("_cfindexOfObject:inRange:"), 
 	    method_getImplementation(m), method_getTypeEncoding(m));
     }
+    
+    rb_define_alloc_func((VALUE)klass, ary_alloc);
 
 #undef INSTALL_METHOD
 }

Modified: MacRuby/branches/lrz_unstable/hash.c
===================================================================
--- MacRuby/branches/lrz_unstable/hash.c	2008-08-03 19:10:34 UTC (rev 403)
+++ MacRuby/branches/lrz_unstable/hash.c	2008-08-03 21:08:32 UTC (rev 404)
@@ -3007,6 +3007,8 @@
     INSTALL_METHOD("isEqual:", imp_rb_hash_isEqual);
     INSTALL_METHOD("containsObject:", imp_rb_hash_containsObject);
 
+    rb_define_alloc_func((VALUE)klass, hash_alloc);
+
 #undef INSTALL_METHOD
 }
 #endif

Modified: MacRuby/branches/lrz_unstable/string.c
===================================================================
--- MacRuby/branches/lrz_unstable/string.c	2008-08-03 19:10:34 UTC (rev 403)
+++ MacRuby/branches/lrz_unstable/string.c	2008-08-03 21:08:32 UTC (rev 404)
@@ -8508,6 +8508,8 @@
     INSTALL_METHOD("_fastestEncodingInCFStringEncoding",
 	imp_rb_str_fastestEncodingInCFStringEncoding);
     INSTALL_METHOD("isEqual:", imp_rb_str_isEqual);
+    
+    rb_define_alloc_func((VALUE)klass, str_alloc);
 }
 
 static CFIndex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macruby-changes/attachments/20080803/54fcd094/attachment.html 


More information about the macruby-changes mailing list