Commits

Ronald Oussoren committed c6e3c5c

Use explict version numbers instead of MAC_OS_X_VERSION macros

The latter cause test problems on OSX 10.5, for some reason the webkit protocols
don't get loaded (the test looks visually correct, but the #if evaluates to false)

Comments (0)

Files changed (3)

pyobjc-framework-Cocoa/Modules/_AppKit_protocols.m

 static void __attribute__((__used__)) use_protocols(void)
 {
     PyObject* p;
-#if PyObjC_BUILD_RELEASE >= MAC_OS_X_VERSION_10_6
+#if PyObjC_BUILD_RELEASE >= 1006
     p = PyObjC_IdToPython(@protocol(NSAlertDelegate)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSAnimatablePropertyContainer)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSAnimationDelegate)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSUserInterfaceValidations)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSValidatedUserInterfaceItem)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSWindowDelegate)); Py_XDECREF(p);
-#endif /* PyObjC_BUILD_RELEASE >= MAC_OS_X_VERSION_10_6 */
-#if PyObjC_BUILD_RELEASE >= MAC_OS_X_VERSION_10_7
+#endif /* PyObjC_BUILD_RELEASE >= 1006 */
+#if PyObjC_BUILD_RELEASE >= 1007
     p = PyObjC_IdToPython(@protocol(NSDraggingDestination)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSDraggingSource)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSPopoverDelegate)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSTextLayoutOrientationProvider)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSUserInterfaceItemIdentification)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSWindowRestoration)); Py_XDECREF(p);
-#endif /* PyObjC_BUILD_RELEASE >= MAC_OS_X_VERSION_10_7 */
-#if PyObjC_BUILD_RELEASE >= MAC_OS_X_VERSION_10_8
+#endif /* PyObjC_BUILD_RELEASE >= 1007 */
+#if PyObjC_BUILD_RELEASE >= 1008
     p = PyObjC_IdToPython(@protocol(NSPageControllerDelegate)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSSharingServiceDelegate)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSSharingServicePickerDelegate)); Py_XDECREF(p);
-#endif /* PyObjC_BUILD_RELEASE >= MAC_OS_X_VERSION_10_8 */
+#endif /* PyObjC_BUILD_RELEASE >= 1008 */
 }

pyobjc-framework-Cocoa/Modules/_Foundation_protocols.m

 static void __attribute__((__used__)) use_protocols(void)
 {
     PyObject* p;
-#if PyObjC_BUILD_RELEASE >= MAC_OS_X_VERSION_10_5
+#if PyObjC_BUILD_RELEASE >= 1005
     p = PyObjC_IdToPython(@protocol(NSCoding)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSCopying)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSDecimalNumberBehaviors)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSURLAuthenticationChallengeSender)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSURLHandleClient)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSURLProtocolClient)); Py_XDECREF(p);
-#endif /* PyObjC_BUILD_RELEASE >= MAC_OS_X_VERSION_10_5 */
-#if PyObjC_BUILD_RELEASE >= MAC_OS_X_VERSION_10_6
+#endif /* PyObjC_BUILD_RELEASE >= 1005 */
+#if PyObjC_BUILD_RELEASE >= 1006
     p = PyObjC_IdToPython(@protocol(NSCacheDelegate)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSConnectionDelegate)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSDiscardableContent)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSSpellServerDelegate)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSStreamDelegate)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSXMLParserDelegate)); Py_XDECREF(p);
-#endif /* PyObjC_BUILD_RELEASE >= MAC_OS_X_VERSION_10_6 */
-#if PyObjC_BUILD_RELEASE >= MAC_OS_X_VERSION_10_7
+#endif /* PyObjC_BUILD_RELEASE >= 1006 */
+#if PyObjC_BUILD_RELEASE >= 1007
     p = PyObjC_IdToPython(@protocol(NSFileManagerDelegate)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSFilePresenter)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSURLConnectionDelegate)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSURLDownloadDelegate)); Py_XDECREF(p);
-#endif /* PyObjC_BUILD_RELEASE >= MAC_OS_X_VERSION_10_7 */
-#if PyObjC_BUILD_RELEASE >= MAC_OS_X_VERSION_10_8
+#endif /* PyObjC_BUILD_RELEASE >= 1007 */
+#if PyObjC_BUILD_RELEASE >= 1008
     p = PyObjC_IdToPython(@protocol(NSSecureCoding)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSURLConnectionDataDelegate)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSURLConnectionDownloadDelegate)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSUserNotificationCenterDelegate)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSXPCListenerDelegate)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(NSXPCProxyCreating)); Py_XDECREF(p);
-#endif /* PyObjC_BUILD_RELEASE >= MAC_OS_X_VERSION_10_8 */
+#endif /* PyObjC_BUILD_RELEASE >= 1008 */
 }

pyobjc-framework-WebKit/Modules/_WebKit_protocols.m

 static void __attribute__((__used__)) use_protocols(void)
 {
     PyObject* p;
-#if PyObjC_BUILD_RELEASE >= MAC_OS_X_VERSION_10_5
+#if PyObjC_BUILD_RELEASE >= 1005
     p = PyObjC_IdToPython(@protocol(DOMEventListener)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(DOMEventTarget)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(DOMNodeFilter)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(WebOpenPanelResultListener)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(WebPlugInViewFactory)); Py_XDECREF(p);
     p = PyObjC_IdToPython(@protocol(WebPolicyDecisionListener)); Py_XDECREF(p);
-#endif /* PyObjC_BUILD_RELEASE >= MAC_OS_X_VERSION_10_5 */
+#endif /* PyObjC_BUILD_RELEASE >= 1005 */
 }