Message127545
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;". |
|
Date |
User |
Action |
Args |
2011-01-30 16:46:02 | belopolsky | set | recipients:
+ belopolsky, theller, Arfrever, marcin.bachry, daniel.urban, Arach |
2011-01-30 16:46:02 | belopolsky | set | messageid: <1296405962.69.0.840459622834.issue11048@psf.upfronthosting.co.za> |
2011-01-30 16:46:00 | belopolsky | link | issue11048 messages |
2011-01-30 16:46:00 | belopolsky | create | |
|