--- Modules/objc-runtime-compat.m 2016-01-20 22:15:49.000000000 -0500 +++ Modules/objc/objc-runtime-compat.m 2016-01-20 22:18:21.000000000 -0500 @@ -872,32 +872,6 @@ #endif /* (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5) || defined(__OBJC2__) */ -#if defined(__x86_64__) - -@implementation Protocol (NSObjectCompat) -- (id)self -{ - return self; -} -@end - -#if PyObjC_BUILD_RELEASE < 1008 -@implementation Object (NSObjectCompat) -- (id)self -{ - return self; -} - --doesNotRecognizeSelector:(SEL)sel -{ - printf("--> %s\n", sel_getName(sel)); - abort(); -} -@end -#endif /* PyObjC_BUILD_RELEASE < 1008 */ - -#endif /* __x86_64__ */ - #if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7) Protocol* (*PyObjC_objc_allocateProtocol)(const char *) = NULL; --- Modules/objc_support.m 2016-01-20 22:16:08.000000000 -0500 +++ Modules/objc/objc_support.m 2016-01-20 22:19:23.000000000 -0500 @@ -42,69 +42,6 @@ +(PyObject*)__pyobjc_PythonTransient__:(int*)cookie; @end /* PyObjCSupport */ -@implementation NSObject (PyObjCSupport) - --(PyObject*)__pyobjc_PythonObject__ -{ - PyObject *rval; - - rval = PyObjC_FindPythonProxy(self); - if (rval == NULL) { - rval = PyObjC_TryCreateCFProxy(self); - if (rval == NULL && PyErr_Occurred()) { - return NULL; - } - } - - if (rval == NULL) { - rval = (PyObject *)PyObjCObject_New(self, - PyObjCObject_kDEFAULT, YES); - if (rval == NULL) { - return NULL; - } - } - - if (rval != NULL) { - PyObjC_RegisterPythonProxy(self, rval); - } - - return rval; -} - -+(PyObject*)__pyobjc_PythonObject__ -{ - PyObject *rval; - - //rval = PyObjC_FindPythonProxy(self); - rval = NULL; - if (rval == NULL) { - rval = (PyObject *)PyObjCClass_New(self); - //PyObjC_RegisterPythonProxy(self, rval); - } - - return rval; -} - --(PyObject*)__pyobjc_PythonTransient__:(int*)cookie -{ - PyObject* result = PyObjC_FindPythonProxy(self); - if (result) { - *cookie = 0; - return result; - } - - *cookie = 1; - return PyObjCObject_New(self, PyObjCObject_kSHOULD_NOT_RELEASE, NO); -} - -+(PyObject*)__pyobjc_PythonTransient__:(int*)cookie -{ - *cookie = 0; - return (PyObject *)PyObjCClass_New(self); -} - -@end /* PyObjCSupport */ - @interface NSProxy (PyObjCSupport) -(PyObject*)__pyobjc_PythonObject__; +(PyObject*)__pyobjc_PythonObject__; @@ -190,45 +127,6 @@ @end /* PyObjCSupport */ - -#if PyObjC_BUILD_RELEASE < 1008 || !defined(__LP64__) -@interface Object (PyObjCSupport) --(PyObject*)__pyobjc_PythonObject__; --(PyObject*)__pyobjc_PythonTransient__:(int*)cookie; -@end /* PyObjCSupport */ - -@implementation Object (PyObjCSupport) - --(PyObject*)__pyobjc_PythonObject__ -{ - PyObject *rval; - - rval = PyObjC_FindPythonProxy(self); - if (rval == NULL) { - rval = (PyObject *)PyObjCObject_New(self, - PyObjCObject_kCLASSIC, NO); - PyObjC_RegisterPythonProxy(self, rval); - } - return rval; -} - --(PyObject*)__pyobjc_PythonTransient__:(int*)cookie -{ - PyObject *rval; - - *cookie = 0; - rval = PyObjC_FindPythonProxy(self); - if (rval == NULL) { - rval = (PyObject *)PyObjCObject_New(self, - PyObjCObject_kCLASSIC, NO); - PyObjC_RegisterPythonProxy(self, rval); - } - return rval; -} - -@end /* PyObjCSupport */ -#endif - @interface NSString (PyObjCSupport) -(PyObject*)__pyobjc_PythonObject__; -(PyObject*)__pyobjc_PythonTransient__:(int*)cookie;