[macruby-changes] [2400] MacRuby/trunk/complex.c

source_changes at macosforge.org source_changes at macosforge.org
Thu Aug 27 21:52:28 PDT 2009


Revision: 2400
          http://trac.macosforge.org/projects/ruby/changeset/2400
Author:   lsansonetti at apple.com
Date:     2009-08-27 21:52:28 -0700 (Thu, 27 Aug 2009)
Log Message:
-----------
added missing write barriers

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

Modified: MacRuby/trunk/complex.c
===================================================================
--- MacRuby/trunk/complex.c	2009-08-28 04:46:49 UTC (rev 2399)
+++ MacRuby/trunk/complex.c	2009-08-28 04:52:28 UTC (rev 2400)
@@ -313,8 +313,8 @@
     NEWOBJ(obj, struct RComplex);
     OBJSETUP(obj, klass, T_COMPLEX);
 
-    obj->real = real;
-    obj->imag = imag;
+    GC_WB(&obj->real, real);
+    GC_WB(&obj->imag, imag);
 
     return (VALUE)obj;
 }
@@ -1298,8 +1298,8 @@
 nucomp_marshal_load(VALUE self, SEL sel, VALUE a)
 {
     get_dat1(self);
-    dat->real = RARRAY_PTR(a)[0];
-    dat->imag = RARRAY_PTR(a)[1];
+    GC_WB(&dat->real, RARRAY_AT(a, 0));
+    GC_WB(&dat->imag, RARRAY_AT(a, 1));
     rb_copy_generic_ivar(self, a);
     return self;
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090827/a92c38dc/attachment.html>


More information about the macruby-changes mailing list