Kaydet (Commit) 53683965 authored tarafından Steve Dower's avatar Steve Dower

#22732 ctypes tests don't set correct restype for intptr_t functions

üst 86e9deb5
......@@ -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
if sizeof(c_longlong) == sizeof(c_void_p):
func.restype = c_longlong
else:
func.restype = c_long
i = c_int(12345678)
## func.argtypes = (POINTER(c_int),)
......
......@@ -69,7 +69,10 @@ class CharPointersTestCase(unittest.TestCase):
def test_int_pointer_arg(self):
func = testdll._testfunc_p_p
func.restype = c_long
if sizeof(c_longlong) == sizeof(c_void_p):
func.restype = c_longlong
else:
func.restype = c_long
self.assertEqual(0, func(0))
ci = c_int(0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment