cpython: a944fe09fae8 (original) (raw)
Mercurial > cpython
changeset 93336:a944fe09fae8
#22732 ctypes tests don't set correct restype for intptr_t functions [#22732]
Steve Dower steve.dower@microsoft.com | |
---|---|
date | Sat, 01 Nov 2014 15:14:27 -0700 |
parents | edb270e5c9c3 |
children | c2a3865a59f4 |
files | Lib/ctypes/test/test_pointers.py Lib/ctypes/test/test_prototypes.py |
diffstat | 2 files changed, 8 insertions(+), 2 deletions(-)[+] [-] Lib/ctypes/test/test_pointers.py 5 Lib/ctypes/test/test_prototypes.py 5 |
line wrap: on
line diff
--- a/Lib/ctypes/test/test_pointers.py +++ b/Lib/ctypes/test/test_pointers.py @@ -24,7 +24,10 @@ class PointersTestCase(unittest.TestCase def test_pass_pointers(self): dll = CDLL(_ctypes_test.file) func = dll._testfunc_p_p
func.restype = c_long[](#l1.7)
if sizeof(c_longlong) == sizeof(c_void_p):[](#l1.8)
func.restype = c_longlong[](#l1.9)
else:[](#l1.10)
func.restype = c_long[](#l1.11)
func.argtypes = (POINTER(c_int),)
--- a/Lib/ctypes/test/test_prototypes.py +++ b/Lib/ctypes/test/test_prototypes.py @@ -69,7 +69,10 @@ class CharPointersTestCase(unittest.Test def test_int_pointer_arg(self): func = testdll._testfunc_p_p
func.restype = c_long[](#l2.7)
if sizeof(c_longlong) == sizeof(c_void_p):[](#l2.8)
func.restype = c_longlong[](#l2.9)
else:[](#l2.10)
func.restype = c_long[](#l2.11) self.assertEqual(0, func(0))[](#l2.12)