[macruby-changes] [4818] MacRuby/trunk/gc.c

source_changes at macosforge.org source_changes at macosforge.org
Sun Oct 24 16:52:18 PDT 2010


Revision: 4818
          http://trac.macosforge.org/projects/ruby/changeset/4818
Author:   lsansonetti at apple.com
Date:     2010-10-24 16:52:15 -0700 (Sun, 24 Oct 2010)
Log Message:
-----------
add implementation for MRI rb_global_variable() API (important: not tested)

Modified Paths:
--------------
    MacRuby/trunk/gc.c

Modified: MacRuby/trunk/gc.c
===================================================================
--- MacRuby/trunk/gc.c	2010-10-23 20:20:36 UTC (rev 4817)
+++ MacRuby/trunk/gc.c	2010-10-24 23:52:15 UTC (rev 4818)
@@ -1059,3 +1059,9 @@
 	rb_objc_install_method2((Class)rb_cFinalizer,
 		"finalize", (IMP)rb_objc_finalizer_finalize);
 }
+
+void
+rb_global_variable(VALUE *slot)
+{
+    auto_zone_add_root(__auto_zone, (void *)slot, *(void **)slot);
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101024/2c3c6fe1/attachment.html>


More information about the macruby-changes mailing list