[macruby-changes] [4799] MacRuby/branches/0.7

source_changes at macosforge.org source_changes at macosforge.org
Fri Oct 15 14:23:45 PDT 2010


Revision: 4799
          http://trac.macosforge.org/projects/ruby/changeset/4799
Author:   lsansonetti at apple.com
Date:     2010-10-15 14:23:44 -0700 (Fri, 15 Oct 2010)
Log Message:
-----------
backport r4769 from trunk

Revision Links:
--------------
    http://trac.macosforge.org/projects/ruby/changeset/4769

Modified Paths:
--------------
    MacRuby/branches/0.7/bridgesupport.cpp
    MacRuby/branches/0.7/rakelib/builder/options.rb

Property Changed:
----------------
    MacRuby/branches/0.7/


Property changes on: MacRuby/branches/0.7
___________________________________________________________________
Modified: svn:mergeinfo
   - /MacRuby/branches/icu:3533-3744
/MacRuby/trunk:4767-4768
   + /MacRuby/branches/icu:3533-3744
/MacRuby/trunk:4767-4769

Modified: MacRuby/branches/0.7/bridgesupport.cpp
===================================================================
--- MacRuby/branches/0.7/bridgesupport.cpp	2010-10-15 21:23:15 UTC (rev 4798)
+++ MacRuby/branches/0.7/bridgesupport.cpp	2010-10-15 21:23:44 UTC (rev 4799)
@@ -1114,7 +1114,7 @@
 		: bs_informal_protocol_imethods;
 
 	    char *type;
-#if __LP64__ && MAC_OS_X_VERSION_MAX_ALLOWED < 1070
+#if !defined(BS_TOT) && __LP64__
 	    // XXX workaround <rdar://problem/7318177> 64-bit informal protocol annotations are missing
 	    // Manually converting some 32-bit types to 64-bit...
 	    const size_t typelen = strlen(bs_inf_prot_method->type) + 1;
@@ -1221,7 +1221,7 @@
     if (!ok) {
 	rb_raise(rb_eRuntimeError, "%s", error);
     }
-#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070
+#if !defined(BS_TOT)
 # if defined(__LP64__)
     static bool R6399046_fixed = false;
     // XXX work around for
@@ -1238,29 +1238,7 @@
     }
 # endif
 #endif
-#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
-    static bool R6401816_fixed = false;
-    // XXX work around for
-    // <rdar://problem/6401816> -[NSObject performSelector:withObject:] has wrong sel_of_type attributes
-    if (!R6401816_fixed) {
-	bs_element_method_t *bs_method = GET_CORE()->find_bs_method((Class)rb_cNSObject,
-		sel_registerName("performSelector:withObject:"));
-	if (bs_method != NULL) {
-	    bs_element_arg_t *arg = bs_method->args;
-	    while (arg != NULL) {
-		if (arg->index == 0
-		    && arg->sel_of_type != NULL
-		    && arg->sel_of_type[0] != '@') {
-		    arg->sel_of_type[0] = '@';
-		    R6401816_fixed = true;
-		    break;
-		}
-		arg++;
-	    }
-	}
-    }
-#endif
-#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070
+#if !defined(BS_TOT)
     static bool R7281806fixed = false;
     // XXX work around for
     // <rdar://problem/7281806> -[NSObject performSelector:] has wrong sel_of_type attributes

Modified: MacRuby/branches/0.7/rakelib/builder/options.rb
===================================================================
--- MacRuby/branches/0.7/rakelib/builder/options.rb	2010-10-15 21:23:15 UTC (rev 4798)
+++ MacRuby/branches/0.7/rakelib/builder/options.rb	2010-10-15 21:23:44 UTC (rev 4799)
@@ -35,6 +35,8 @@
   ENV['LLVM_TOT'] = '1'
 end
 
+BS_TOT = File.exist?('/System/Library/BridgeSupport/ruby-1.8/bridgesupportparser.bundle')
+
 RUBY_INSTALL_NAME = b.option('ruby_install_name', 'macruby')
 RUBY_SO_NAME = b.option('ruby_so_name', RUBY_INSTALL_NAME)
 LLVM_PATH = b.option('llvm_path', llvm_default_path)
@@ -169,6 +171,10 @@
       @cflags << ' -DNO_LIBAUTO'
       @cxxflags << ' -DNO_LIBAUTO'
     end
+    if BS_TOT
+      @cflags << ' -DBS_TOT'
+      @cxxflags << ' -DBS_TOT'
+    end
     @cxxflags << " -fno-rtti" unless @cxxflags.index("-fno-rtti")
     @dldflags = "-dynamiclib -undefined suppress -flat_namespace -install_name #{INSTALL_NAME} -current_version #{MACRUBY_VERSION} -compatibility_version #{MACRUBY_VERSION} -exported_symbols_list #{EXPORTED_SYMBOLS_LIST}"
     if `sw_vers -productVersion`.to_f <= 10.6
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101015/a158f3bb/attachment.html>


More information about the macruby-changes mailing list