[pypy-commit] pypy default: Fix for ctypes on Python 2.5: "c_byte" is a better approximation of
arigo
noreply at buildbot.pypy.org
Wed Dec 7 20:35:44 CET 2011
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r50286:34288a8ab7fd
Date: 2011-12-07 20:35 +0100
http://bitbucket.org/pypy/pypy/changeset/34288a8ab7fd/
Log: Fix for ctypes on Python 2.5: "c_byte" is a better approximation of
the missing "c_bool", although still not perfect.
diff --git a/pypy/rpython/lltypesystem/ll2ctypes.py b/pypy/rpython/lltypesystem/ll2ctypes.py
--- a/pypy/rpython/lltypesystem/ll2ctypes.py
+++ b/pypy/rpython/lltypesystem/ll2ctypes.py
@@ -112,7 +112,7 @@
rffi.LONGLONG: ctypes.c_longlong,
rffi.ULONGLONG: ctypes.c_ulonglong,
rffi.SIZE_T: ctypes.c_size_t,
- lltype.Bool: getattr(ctypes, "c_bool", ctypes.c_long),
+ lltype.Bool: getattr(ctypes, "c_bool", ctypes.c_byte),
llmemory.Address: ctypes.c_void_p,
llmemory.GCREF: ctypes.c_void_p,
llmemory.WeakRef: ctypes.c_void_p, # XXX
More information about the pypy-commit
mailing list