Alexander Belopolsky <[email protected]> added the comment:
It would be nice to add a unit test to this patch. I don't think messing with
read-only filesystems is feasible in regrtest, but it seems from reading
_ctypes_alloc_callback() source that similar behavior can be triggered by
passing a failing converters list to a ctypes function constructor.
A nit-pick: it would be easier to verify that all CThunkObject fields are
initialized if initialization was done in the same order as declaration:
typedef struct {
PyObject_VAR_HEAD
...
PyObject *callable;
PyObject *restype;
SETFUNC setfunc;
ffi_type *ffi_restype;
ffi_type *atypes[1];
} CThunkObject;
In other words, "p->restype = NULL;" should go after "p->callable = NULL;".
----------
nosy: +belopolsky
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue11048>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com