Message370089
Example:
---
from ctypes import c_int, CFUNCTYPE
def func():
return (1, 2, 3)
cb = CFUNCTYPE(c_int)(func)
cb()
---
Output:
---
Traceback (most recent call last):
File "_ctypes/callbacks.c", line 262, in 'converting callback result'
TypeError: an integer is required (got type tuple)
Exception ignored in: <function func at 0x7f0c267ff1f0>
---
Assertion error in debug mode:
---
Traceback (most recent call last):
File "_ctypes/callbacks.c", line 262, in 'converting callback result'
TypeError: 'tuple' object cannot be interpreted as an integer
python: Python/errors.c:1435: _PyErr_WriteUnraisableMsg: Assertion `exc_type != NULL' failed.
Abandon (core dumped)
---
Attached PR fix the issue. |
|
Date |
User |
Action |
Args |
2020-05-27 14:44:18 | vstinner | set | recipients:
+ vstinner |
2020-05-27 14:44:18 | vstinner | set | messageid: <1590590658.49.0.612790938119.issue40795@roundup.psfhosted.org> |
2020-05-27 14:44:18 | vstinner | link | issue40795 messages |
2020-05-27 14:44:17 | vstinner | create | |
|