Ticket #35325: patch-Modules.diff

File patch-Modules.diff, 2.7 KB (added by tamyrvoll@…, 12 years ago)
  • objc/objc-runtime-compat.m

    diff -rupN Modules-original/objc/objc-runtime-compat.m Modules/objc/objc-runtime-compat.m
    old new size_t PyObjC_methodlist_magic(Class cls 
    981981
    982982#endif
    983983
    984 #if defined(__x86_64__)
    985984
    986 @implementation Protocol (NSOBjectCompat)
    987 - self
    988 {
    989         return self;
    990 }
    991 @end
    992 
    993 @implementation Object (NSOBjectCompat)
    994 - self
    995 {
    996         return self;
    997 }
    998 
    999 -doesNotRecognizeSelector:(SEL)sel
    1000 {
    1001         printf("--> %s\n", sel_getName(sel));
    1002         abort();
    1003 }
    1004 @end
    1005        
    1006 
    1007 #endif
  • objc/objc_support.m

    diff -rupN Modules-original/objc/objc_support.m Modules/objc/objc_support.m
    old new  
    150150-(PyObject*)__pyobjc_PythonTransient__:(int*)cookie;
    151151@end /* PyObjCSupport */
    152152
    153 @implementation Protocol (PyObjCSupport)
    154153
    155 -(PyObject*)__pyobjc_PythonObject__
    156 {
    157         PyObject *rval;
    158 
    159         rval = PyObjC_FindPythonProxy(self);
    160         if (rval == NULL) {
    161                 rval = PyObjCFormalProtocol_ForProtocol(self);
    162         }
    163         return rval;
    164 }
    165 
    166 -(PyObject*)__pyobjc_PythonTransient__:(int*)cookie
    167 {
    168         PyObject *rval;
    169 
    170         *cookie = 0;
    171         rval = PyObjC_FindPythonProxy(self);
    172         if (rval == NULL) {
    173                 rval = PyObjCFormalProtocol_ForProtocol(self);
    174         }
    175         return rval;
    176 }
    177 
    178 @end /* PyObjCSupport */
    179 
    180 @interface Object (PyObjCSupport)
    181 -(PyObject*)__pyobjc_PythonObject__;
    182 -(PyObject*)__pyobjc_PythonTransient__:(int*)cookie;
    183 @end /* PyObjCSupport */
    184 
    185 @implementation Object (PyObjCSupport)
    186 
    187 -(PyObject*)__pyobjc_PythonObject__
    188 {
    189         PyObject *rval;
    190 
    191         rval = PyObjC_FindPythonProxy(self);
    192         if (rval == NULL) {
    193                 rval = (PyObject *)PyObjCObject_New(self,
    194                                 PyObjCObject_kCLASSIC, NO);
    195                 PyObjC_RegisterPythonProxy(self, rval);
    196         }
    197         return rval;
    198 }
    199 
    200 -(PyObject*)__pyobjc_PythonTransient__:(int*)cookie
    201 {
    202         PyObject *rval;
    203 
    204         *cookie = 0;
    205         rval = PyObjC_FindPythonProxy(self);
    206         if (rval == NULL) {
    207                 rval = (PyObject *)PyObjCObject_New(self,
    208                                 PyObjCObject_kCLASSIC, NO);
    209                 PyObjC_RegisterPythonProxy(self, rval);
    210         }
    211         return rval;
    212 }
    213 
    214 @end /* PyObjCSupport */
    215154
    216155@interface NSString (PyObjCSupport)
    217156-(PyObject*)__pyobjc_PythonObject__;
  • objc/selector.m

    diff -rupN Modules-original/objc/selector.m Modules/objc/selector.m
    old new PyObjCSelector_FindNative(PyObject* self 
    798798                }
    799799        }
    800800
    801         if (Object_class == nil) {
    802                 Object_class = [Object class];
    803         }
    804801
    805802        if (name[0] == '_' && name[1] == '_') {
    806803                /* No known Objective-C class has methods whose name