Ronald Oussoren avatar 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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.