Commits

Ronald Oussoren committed ac6a509

Fix compilation issue with 10.4 SDK

  • Participants
  • Parent commits fdb98a1

Comments (0)

Files changed (3)

pyobjc-core/Modules/objc/objc-runtime-compat.h

 
 #define class_addMethodList	PyObjC_class_addMethodList
 
+/* 
+ * XXX: Override protocol_getMethodDescription. This is a crude hack that's added because
+ * protocol_getMethodDescription sometimes gives the wrong answer (test_protocols.py).
+ * I haven't found the root cause for this yet, it may or may not be a problem with PyObjC.
+ */
+extern struct objc_method_description PyObjC_protocol_getMethodDescription(Protocol *p, SEL aSel, BOOL isRequiredMethod, BOOL isInstanceMethod);
+#define protocol_getMethodDescription PyObjC_protocol_getMethodDescription
 
 #endif
 
 
+
 #if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7)
 extern Protocol* (*PyObjC_objc_allocateProtocol)(const char *);
 extern void (*PyObjC_objc_registerProtocol)(Protocol*);
 
 #endif
 
-/* 
- * XXX: Override protocol_getMethodDescription. This is a crude hack that's added because
- * protocol_getMethodDescription sometimes gives the wrong answer (test_protocols.py).
- * I haven't found the root cause for this yet, it may or may not be a problem with PyObjC.
- */
-extern struct objc_method_description PyObjC_protocol_getMethodDescription(Protocol *p, SEL aSel, BOOL isRequiredMethod, BOOL isInstanceMethod);
-#define protocol_getMethodDescription PyObjC_protocol_getMethodDescription
 
 
 extern void PyObjC_SetupRuntimeCompat(void);

pyobjc-core/Modules/objc/objc-runtime-compat.m

 #endif
 #endif
 
+#if !((MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5) &&!defined(__OBJC2__))
 #undef protocol_getMethodDescription
 struct objc_method_description 
 PyObjC_protocol_getMethodDescription(Protocol *p, SEL aSel, BOOL isRequiredMethod, BOOL isInstanceMethod)
 
 	}
 }
+#endif
 
 
 

pyobjc-core/setup.py

 # Enable 'PyObjC_STRICT_DEBUGGING' to enable some costly internal 
 # assertions. 
 CFLAGS.extend([
-    "-fdiagnostics-show-option",
+    #"-fdiagnostics-show-option",
     
     # Use this to analyze with clang
     #"--analyze",