|
40 | 40 |
|
41 | 41 | __LP64__ = (8*struct.calcsize("P") == 64)
|
42 | 42 | __i386__ = (platform.machine() == 'i386')
|
| 43 | +__arm64__ = (platform.machine() == 'arm64') |
43 | 44 |
|
44 | 45 | if sizeof(c_void_p) == 4:
|
45 | 46 | c_ptrdiff_t = c_int32
|
|
129 | 130 | objc.class_getMethodImplementation.restype = c_void_p
|
130 | 131 | objc.class_getMethodImplementation.argtypes = [c_void_p, c_void_p]
|
131 | 132 |
|
132 |
| -# IMP class_getMethodImplementation_stret(Class cls, SEL name) |
133 |
| -objc.class_getMethodImplementation_stret.restype = c_void_p |
134 |
| -objc.class_getMethodImplementation_stret.argtypes = [c_void_p, c_void_p] |
| 133 | +if not __arm64__: |
| 134 | + # marked as OBJC_ARM64_UNAVAILABLE |
| 135 | + # IMP class_getMethodImplementation_stret(Class cls, SEL name) |
| 136 | + objc.class_getMethodImplementation_stret.restype = c_void_p |
| 137 | + objc.class_getMethodImplementation_stret.argtypes = [c_void_p, c_void_p] |
135 | 138 |
|
136 | 139 | # const char * class_getName(Class cls)
|
137 | 140 | objc.class_getName.restype = c_char_p
|
|
278 | 281 | # id objc_msgSend(id theReceiver, SEL theSelector, ...)
|
279 | 282 | # id objc_msgSendSuper(struct objc_super *super, SEL op, ...)
|
280 | 283 |
|
281 |
| -# void objc_msgSendSuper_stret(struct objc_super *super, SEL op, ...) |
282 |
| -objc.objc_msgSendSuper_stret.restype = None |
| 284 | +if not __arm64__: |
| 285 | + # marked as OBJC_ARM64_UNAVAILABLE |
| 286 | + # void objc_msgSendSuper_stret(struct objc_super *super, SEL op, ...) |
| 287 | + objc.objc_msgSendSuper_stret.restype = None |
283 | 288 |
|
284 |
| -# double objc_msgSend_fpret(id self, SEL op, ...) |
285 |
| -# objc.objc_msgSend_fpret.restype = c_double |
| 289 | +if not __arm64__: |
| 290 | + # marked as OBJC_ARM64_UNAVAILABLE |
| 291 | + # double objc_msgSend_fpret(id self, SEL op, ...) |
| 292 | + objc.objc_msgSend_fpret.restype = c_double |
286 | 293 |
|
287 |
| -# void objc_msgSend_stret(void * stretAddr, id theReceiver, SEL theSelector, ...) |
288 |
| -objc.objc_msgSend_stret.restype = None |
| 294 | +if not __arm64__: |
| 295 | + # marked as OBJC_ARM64_UNAVAILABLE |
| 296 | + # void objc_msgSend_stret(void * stretAddr, id theReceiver, SEL theSelector, ...) |
| 297 | + objc.objc_msgSend_stret.restype = None |
289 | 298 |
|
290 | 299 | # void objc_registerClassPair(Class cls)
|
291 | 300 | objc.objc_registerClassPair.restype = None
|
|
0 commit comments