[macruby-changes] [1042] MacRuby/branches/experimental

source_changes at macosforge.org source_changes at macosforge.org
Fri Mar 20 22:10:26 PDT 2009


Revision: 1042
          http://trac.macosforge.org/projects/ruby/changeset/1042
Author:   lsansonetti at apple.com
Date:     2009-03-20 22:10:26 -0700 (Fri, 20 Mar 2009)
Log Message:
-----------
implemented rb_iter_break()

Modified Paths:
--------------
    MacRuby/branches/experimental/include/ruby/ruby.h
    MacRuby/branches/experimental/roxor.cpp
    MacRuby/branches/experimental/roxor.h

Modified: MacRuby/branches/experimental/include/ruby/ruby.h
===================================================================
--- MacRuby/branches/experimental/include/ruby/ruby.h	2009-03-21 04:30:31 UTC (rev 1041)
+++ MacRuby/branches/experimental/include/ruby/ruby.h	2009-03-21 05:10:26 UTC (rev 1042)
@@ -939,7 +939,7 @@
 PRINTF_ARGS(NORETURN(void rb_fatal(const char*, ...)), 1, 2);
 PRINTF_ARGS(NORETURN(void rb_bug(const char*, ...)), 1, 2);
 NORETURN(void rb_sys_fail(const char*));
-NORETURN(void rb_iter_break(void));
+void rb_iter_break(void);
 NORETURN(void rb_exit(int));
 NORETURN(void rb_notimplement(void));
 

Modified: MacRuby/branches/experimental/roxor.cpp
===================================================================
--- MacRuby/branches/experimental/roxor.cpp	2009-03-21 04:30:31 UTC (rev 1041)
+++ MacRuby/branches/experimental/roxor.cpp	2009-03-21 05:10:26 UTC (rev 1042)
@@ -1774,7 +1774,7 @@
     safe_level = 0;
 
     backref = Qnil;
-    broken_with = 0;
+    broken_with = Qundef;
 
     load_path = rb_ary_new();
     rb_objc_retain((void *)load_path);
@@ -5345,7 +5345,7 @@
 rb_vm_pop_broken_value(void)
 {
     VALUE val = GET_VM()->broken_with;
-    GET_VM()->broken_with = 0;
+    GET_VM()->broken_with = Qundef;
     return val;
 }
 
@@ -5576,8 +5576,7 @@
 void
 rb_iter_break(void)
 {
-    // TODO should be a #define that calls return
-    abort();
+    GET_VM()->broken_with = Qnil;
 }
 
 extern "C"

Modified: MacRuby/branches/experimental/roxor.h
===================================================================
--- MacRuby/branches/experimental/roxor.h	2009-03-21 04:30:31 UTC (rev 1041)
+++ MacRuby/branches/experimental/roxor.h	2009-03-21 05:10:26 UTC (rev 1042)
@@ -152,7 +152,7 @@
 #define RETURN_IF_BROKEN() \
     do { \
 	VALUE __v = rb_vm_pop_broken_value(); \
-	if (__v != 0) { \
+	if (__v != Qundef) { \
 	    return __v; \
 	} \
     } \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090320/b7a68964/attachment.html>


More information about the macruby-changes mailing list