8000 minor adjustments · python/cpython@a1752d4 · GitHub
[go: up one dir, main page]

Skip to content

Commit a1752d4

Browse files
committed
minor adjustments
1 parent 4a9dfe4 commit a1752d4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Modules/_ctypes/_ctypes.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,8 +449,8 @@ static PyType_Spec structparam_spec = {
449449

450450
/*
451451
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
454454
accessible fields somehow.
455455
*/
456456

@@ -2715,8 +2715,9 @@ PyCData_clear(CDataObject *self)
27152715
{
27162716
Py_CLEAR(self->b_objects);
27172717
if ((self->b_needsfree)
2718-
&& _CDataObject_HasExternalBuffer(self))
2718+
&& _CDataObject_HasExternalBuffer(self)) {
27192719
PyMem_Free(self->b_ptr);
2720+
}
27202721
self->b_ptr = NULL;
27212722
Py_CLEAR(self->b_base);
27222723
return 0;

Modules/_ctypes/ctypes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ extern PyTypeObject PyCStructType_Type;
186186
#define ArrayObject_Check(st, v) PyObject_TypeCheck((v), (st)->PyCArray_Type)
187187
#define PointerObject_Check(st, v) PyObject_TypeCheck((v), (st)->PyCPointer_Type)
188188
#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)
190190
#define PyCFuncPtrTypeObject_Check(v) PyObject_TypeCheck(v, &PyCFuncPtrType_Type)
191191
#define PyCStructTypeObject_Check(v) PyObject_TypeCheck(v, &PyCStructType_Type)
192192

0 commit comments

Comments
 (0)
0