Commits

Ronald Oussoren  committed 3664e9a

Some minor 64-bit tweaks

  • Participants
  • Parent commits c4e7cfd
  • Branches pyobjc-ancient

Comments (0)

Files changed (2)

File pyobjc-core/Modules/objc/objc_util.m

 		return YES;
 	}
 	switch (type_code) {
+	case _C_LNG_LNG:
+#ifdef __LP64__
+		/* fall through */
+#else
+		return NO;
+#endif
+	case _C_LNG: 
+		return (array_code == 'l') 
+#ifndef __LP64__
+			|| (array_code == 'i')
+#endif
+		;
+	case _C_ULNG_LNG:
+#ifdef __LP64__
+		/* fall through */
+#else
+		return NO;
+#endif
+	case _C_ULNG: 
+		return (array_code == 'L') 
+#ifndef __LP64__
+			|| (array_code == 'I')
+#endif
+		;
+
+	case _C_INT: 
+		return (array_code == 'i') 
+#ifndef __LP64__
+			|| (array_code == 'l')
+#endif
+		;
+	case _C_UINT: 
+		return (array_code == 'I') 
+#ifndef __LP64__
+			|| (array_code == 'L')
+#endif
+		;
+
 	case _C_NSBOOL:
 		return (array_code == _C_CHR) || (array_code == _C_UCHR);
 	case _C_CHAR_AS_INT:

File pyobjc-core/Modules/objc/toll-free-bridging.m

 
 	}
 
-#if !defined(__OBJC2__) && (PY_VERSION_HEX < 0x03000000)
+#if 0
+//#if !defined(__OBJC2__) && (PY_VERSION_HEX < 0x03000000)
+#endif
+#if (PY_VERSION_HEX < 0x03000000)
 	int r;
 
 	/* Fall back to MacPython CFType support: */
 PyObjC_IDToCFType(id argument __attribute__((__unused__)))
 {
 
-#if 0 /*!defined(__OBJC2__) && (PY_VERSION_HEX < 0x03000000)*/
+#if !defined(__OBJC2__) && (PY_VERSION_HEX < 0x03000000)
 	CFTypeRef typeRef = (CFTypeRef)argument;
 	CFTypeID typeID = CFGetTypeID(argument);