[macruby-changes] [680] MacRuby/trunk

source_changes at macosforge.org source_changes at macosforge.org
Mon Oct 27 18:23:44 PDT 2008


Revision: 680
          http://trac.macosforge.org/projects/ruby/changeset/680
Author:   lsansonetti at apple.com
Date:     2008-10-27 18:23:43 -0700 (Mon, 27 Oct 2008)
Log Message:
-----------
misc fixes

Modified Paths:
--------------
    MacRuby/trunk/iseq.c
    MacRuby/trunk/string.c
    MacRuby/trunk/vm_core.h

Modified: MacRuby/trunk/iseq.c
===================================================================
--- MacRuby/trunk/iseq.c	2008-10-27 07:39:28 UTC (rev 679)
+++ MacRuby/trunk/iseq.c	2008-10-28 01:23:43 UTC (rev 680)
@@ -67,6 +67,9 @@
     RUBY_FREE_LEAVE("iseq");
 }
 
+#if WITH_OBJC
+# define iseq_mark NULL
+#else
 static void
 iseq_mark(void *ptr)
 {
@@ -92,6 +95,7 @@
     }
     RUBY_MARK_LEAVE("iseq");
 }
+#endif
 
 static VALUE
 iseq_alloc(VALUE klass)
@@ -180,10 +184,10 @@
     RBASIC(iseq->compile_data->mark_ary)->klass = 0;
 #endif
 
-    iseq->compile_data->storage_head = iseq->compile_data->storage_current =
-      (struct iseq_compile_data_storage *)
+    GC_WB(&iseq->compile_data->storage_current,
 	ALLOC_N(char, INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE +
-		sizeof(struct iseq_compile_data_storage));
+		sizeof(struct iseq_compile_data_storage)));
+    iseq->compile_data->storage_head = iseq->compile_data->storage_current;
 
     GC_WB(&iseq->compile_data->catch_table_ary, rb_ary_new());
     iseq->compile_data->storage_head->pos = 0;

Modified: MacRuby/trunk/string.c
===================================================================
--- MacRuby/trunk/string.c	2008-10-27 07:39:28 UTC (rev 679)
+++ MacRuby/trunk/string.c	2008-10-28 01:23:43 UTC (rev 680)
@@ -5239,6 +5239,12 @@
     }
 }
 
+static bool
+imp_rb_symbol_isEqual(void *rcv, SEL sel, void *other)
+{
+    return rcv == other;
+}
+
 static void
 install_symbol_primitives(void)
 {
@@ -5247,6 +5253,7 @@
     rb_objc_install_method2(klass, "length", (IMP)imp_rb_symbol_length);
     rb_objc_install_method2(klass, "characterAtIndex:", (IMP)imp_rb_symbol_characterAtIndex);
     rb_objc_install_method2(klass, "getCharacters:range:", (IMP)imp_rb_symbol_getCharactersRange);
+    rb_objc_install_method2(klass, "isEqual:", (IMP)imp_rb_symbol_isEqual);
 }
 
 #undef INSTALL_METHOD

Modified: MacRuby/trunk/vm_core.h
===================================================================
--- MacRuby/trunk/vm_core.h	2008-10-27 07:39:28 UTC (rev 679)
+++ MacRuby/trunk/vm_core.h	2008-10-28 01:23:43 UTC (rev 680)
@@ -148,7 +148,9 @@
 struct iseq_compile_data {
     /* GC is needed */
     VALUE err_info;
+#if !WITH_OBJC
     VALUE mark_ary;
+#endif
     VALUE catch_table_ary;	/* Array */
 
     /* GC is not needed */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20081027/e890f21d/attachment.html>


More information about the macruby-changes mailing list