Commits

Ronald Oussoren committed f1d1145

Fix some py3k issues

Comments (0)

Files changed (4)

pyobjc-core/Lib/objc/_bridgesupport.py

 
 for method in (b'alloc', b'copy', b'copyWithZone:', b'mutableCopy', b'mutableCopyWithZone:'):
     registerMetaDataForSelector(b'NSObject', method,
-            dict(
-                retval=dict(already_retained=True),
-            ))
+            {
+                'retval': { 'already_retained': True },
+            })
 
 
 #

pyobjc-core/Lib/objc/_descriptors.py

 import warnings
 from inspect import getargspec
 
-_C_NSRange = ["{_NSRange=II}", "{_NSRange=QQ}"][sys.maxsize > 2**32]
+_C_NSRange = [b"{_NSRange=II}", b"{_NSRange=QQ}"][sys.maxsize > 2**32]
 
 #
 # Interface builder support.

pyobjc-core/Modules/objc/struct-wrapper.m

 	{
 		"_replace", 
 		(PyCFunction)struct_replace,
-		METH_KEYWORDS, 
+		METH_VARARGS|METH_KEYWORDS, 
 		NULL
 	}, 
 	{ NULL, NULL, 0, NULL }

pyobjc-core/PyObjCTest/test_descriptors.py

 from PyObjCTools.TestSupport import *
 
 import objc
+import sys
 
 try:
     from  Foundation import NSRange