[PyObjC-svn] r2405 - trunk/pyobjc/pyobjc-core/Modules/objc
[email protected] Sun, 07 Feb 2010 08:16:42 -0600
| Newsgroups | gmane.comp.python.pyobjc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: ronaldoussoren
Date: Sun Feb 7 08:16:41 2010
New Revision: 2405
Log:
Some minor 64-bit tweaks
Modified:
trunk/pyobjc/pyobjc-core/Modules/objc/objc_util.m
trunk/pyobjc/pyobjc-core/Modules/objc/toll-free-bridging.m
Modified: trunk/pyobjc/pyobjc-core/Modules/objc/objc_util.m
==============================================================================
--- trunk/pyobjc/pyobjc-core/Modules/objc/objc_util.m (original)
+++ trunk/pyobjc/pyobjc-core/Modules/objc/objc_util.m Sun Feb 7 08:16:41 2010
@@ -587,6 +587,44 @@
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:
Modified: trunk/pyobjc/pyobjc-core/Modules/objc/toll-free-bridging.m
==============================================================================
--- trunk/pyobjc/pyobjc-core/Modules/objc/toll-free-bridging.m (original)
+++ trunk/pyobjc/pyobjc-core/Modules/objc/toll-free-bridging.m Sun Feb 7 08:16:41 2010
@@ -26,7 +26,10 @@
}
-#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: */
@@ -48,7 +51,7 @@
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);
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com