[macruby-changes] [3933] MacRuby/trunk/objc.h

source_changes at macosforge.org source_changes at macosforge.org
Wed Apr 14 13:04:14 PDT 2010


Revision: 3933
          http://trac.macosforge.org/projects/ruby/changeset/3933
Author:   eloy.de.enige at gmail.com
Date:     2010-04-14 13:04:13 -0700 (Wed, 14 Apr 2010)
Log Message:
-----------
Make NSNumber bridging work for us on old systems again

Modified Paths:
--------------
    MacRuby/trunk/objc.h

Modified: MacRuby/trunk/objc.h
===================================================================
--- MacRuby/trunk/objc.h	2010-04-14 20:01:45 UTC (rev 3932)
+++ MacRuby/trunk/objc.h	2010-04-14 20:04:13 UTC (rev 3933)
@@ -202,7 +202,11 @@
     if (obj == (id)kCFNull || obj == nil) {
 	return Qnil;
     }
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070
+    if (true) {
+#else
     if (((unsigned long)obj & 0x1) == 0x1) {
+#endif
 	// An Objective-C immediate! We only recognize NSNumbers for now.
 	Class k = object_getClass(obj);
 	while (k != NULL) {
@@ -223,7 +227,9 @@
 	    }
 	    k = class_getSuperclass(k);
 	}
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
 	rb_bug("unknown Objective-C immediate: %p\n", obj);
+#endif
     }
     return (VALUE)obj;
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100414/62588b18/attachment-0001.html>


More information about the macruby-changes mailing list