Skip to content

Commit 4e9bb3c

Browse files
Add a py3 compatible workaround for the removed long type
1 parent 0cdc221 commit 4e9bb3c

File tree

1 file changed

+3
-0
lines changed
  • tools/SourceKit/bindings/python/sourcekitd

1 file changed

+3
-0
lines changed

tools/SourceKit/bindings/python/sourcekitd/capi.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ def __get__(self, instance, instance_type=None):
6464
class Object(object):
6565

6666
def __init__(self, obj):
67+
import sys
68+
if sys.version_info > (3,):
69+
long = int
6770
if isinstance(obj, Object):
6871
self._obj = conf.lib.sourcekitd_request_retain(obj)
6972
elif isinstance(obj, (int, long, bool)):

0 commit comments

Comments
 (0)