mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
add test and news
Signed-off-by: Manjusaka <me@manjusaka.me>
This commit is contained in:
parent
e3c2b67c6f
commit
39cc479e02
2 changed files with 9 additions and 0 deletions
|
|
@ -130,6 +130,14 @@ class CFuncPtrTestCase(unittest.TestCase, StructCheckMixin):
|
|||
def test_abstract(self):
|
||||
self.assertRaises(TypeError, _CFuncPtr, 13, "name", 42, "iid")
|
||||
|
||||
def test_invalid_argtypes(self):
|
||||
libc = CDLL(None)
|
||||
|
||||
PRINTF_PROTO = CFUNCTYPE(c_int, ctypes.c_char_p)
|
||||
c_printf = PRINTF_PROTO(("printf", libc), ((1,),))
|
||||
c_printf.argtypes = (c_char_p, c_int)
|
||||
with self.assertRaises(TypeError):
|
||||
c_printf(b"Hello\n")
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
Fix segfaults in _cyptes during _build_callargs.
|
||||
Loading…
Add table
Add a link
Reference in a new issue