[macruby-changes] [1818] MacRuby/branches/experimental/vm.h

source_changes at macosforge.org source_changes at macosforge.org
Mon Jun 8 22:49:14 PDT 2009


Revision: 1818
          http://trac.macosforge.org/projects/ruby/changeset/1818
Author:   lsansonetti at apple.com
Date:     2009-06-08 22:49:14 -0700 (Mon, 08 Jun 2009)
Log Message:
-----------
make sure RObject types are allocated as AUTO_OBJECT_SCANNED (very important!)

Modified Paths:
--------------
    MacRuby/branches/experimental/vm.h

Modified: MacRuby/branches/experimental/vm.h
===================================================================
--- MacRuby/branches/experimental/vm.h	2009-06-09 05:48:32 UTC (rev 1817)
+++ MacRuby/branches/experimental/vm.h	2009-06-09 05:49:14 UTC (rev 1818)
@@ -305,7 +305,7 @@
     struct RObject *obj;
     int num_slots = 10;
 
-    obj = (struct RObject *)xmalloc(sizeof(struct RObject));
+    obj = (struct RObject *)rb_objc_newobj(sizeof(struct RObject));
     GC_WB(&obj->slots, xmalloc(num_slots * sizeof(VALUE)));
 
     OBJSETUP(obj, klass, T_OBJECT);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090608/5d719dbe/attachment.html>


More information about the macruby-changes mailing list