File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -449,8 +449,8 @@ static PyType_Spec structparam_spec = {
449
449
450
450
/*
451
451
PyCStructType_Type - a meta type/class. Creating a new class using this one as
452
- __metaclass__ will call the constructor StructUnionType_new. It replaces the
453
- tp_dict member with a new instance of StgDict, and initializes the C
452
+ __metaclass__ will call the constructor StructUnionType_new/init . It replaces
453
+ the tp_dict member with a new instance of StgDict, and initializes the C
454
454
accessible fields somehow.
455
455
*/
456
456
@@ -2715,8 +2715,9 @@ PyCData_clear(CDataObject *self)
2715
2715
{
2716
2716
Py_CLEAR (self -> b_objects );
2717
2717
if ((self -> b_needsfree )
2718
- && _CDataObject_HasExternalBuffer (self ))
2718
+ && _CDataObject_HasExternalBuffer (self )) {
2719
2719
PyMem_Free (self -> b_ptr );
2720
+ }
2720
2721
self -> b_ptr = NULL ;
2721
2722
Py_CLEAR (self -> b_base );
2722
2723
return 0 ;
Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ extern PyTypeObject PyCStructType_Type;
186
186
#define ArrayObject_Check (st , v ) PyObject_TypeCheck((v), (st)->PyCArray_Type)
187
187
#define PointerObject_Check (st , v ) PyObject_TypeCheck((v), (st)->PyCPointer_Type)
188
188
#define PyCPointerTypeObject_Check (v ) PyObject_TypeCheck(v, &PyCPointerType_Type)
189
- #define PyCFuncPtrObject_Check (st ,v ) PyObject_TypeCheck((v), (st)->PyCFuncPtr_Type)
189
+ #define PyCFuncPtrObject_Check (st , v ) PyObject_TypeCheck((v), (st)->PyCFuncPtr_Type)
190
190
#define PyCFuncPtrTypeObject_Check (v ) PyObject_TypeCheck(v, &PyCFuncPtrType_Type)
191
191
#define PyCStructTypeObject_Check (v ) PyObject_TypeCheck(v, &PyCStructType_Type)
192
192
You can’t perform that action at this time.
0 commit comments