Author: Armin Rigo <[email protected]>
Branch:
Changeset: r44154:ad77c5596e16
Date: 2011-05-14 12:05 +0200
http://bitbucket.org/pypy/pypy/changeset/ad77c5596e16/
Log: Add argtypes and restype to the ctypes functions.
diff --git a/lib-python/2.7/uuid.py b/lib-python/modified-2.7/uuid.py
copy from lib-python/2.7/uuid.py
copy to lib-python/modified-2.7/uuid.py
--- a/lib-python/2.7/uuid.py
+++ b/lib-python/modified-2.7/uuid.py
@@ -406,8 +406,12 @@
continue
if hasattr(lib, 'uuid_generate_random'):
_uuid_generate_random = lib.uuid_generate_random
+ _uuid_generate_random.argtypes = [ctypes.c_char * 16]
+ _uuid_generate_random.restype = None
if hasattr(lib, 'uuid_generate_time'):
_uuid_generate_time = lib.uuid_generate_time
+ _uuid_generate_time.argtypes = [ctypes.c_char * 16]
+ _uuid_generate_time.restype = None
# The uuid_generate_* functions are broken on MacOS X 10.5, as noted
# in issue #8621 the function generates the same sequence of values
@@ -436,6 +440,9 @@
lib = None
_UuidCreate = getattr(lib, 'UuidCreateSequential',
getattr(lib, 'UuidCreate', None))
+ if _UuidCreate is not None:
+ _UuidCreate.argtypes = [ctypes.c_char * 16]
+ _UuidCreate.restype = ctypes.c_int
except:
pass
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit