mirror of https://github.com/python/cpython
bpo-39573: Use Py_TYPE() macro in ctypes.h (GH-18411)
This commit is contained in:
parent
0edc2c7678
commit
7f6f7eef52
|
@ -112,12 +112,12 @@ extern int PyObject_stginfo(PyObject *self, Py_ssize_t *psize, Py_ssize_t *palig
|
|||
|
||||
|
||||
extern PyTypeObject PyCData_Type;
|
||||
#define CDataObject_CheckExact(v) ((v)->ob_type == &PyCData_Type)
|
||||
#define CDataObject_CheckExact(v) (Py_TYPE(v) == &PyCData_Type)
|
||||
#define CDataObject_Check(v) PyObject_TypeCheck(v, &PyCData_Type)
|
||||
#define _CDataObject_HasExternalBuffer(v) ((v)->b_ptr != (char *)&(v)->b_value)
|
||||
|
||||
extern PyTypeObject PyCSimpleType_Type;
|
||||
#define PyCSimpleTypeObject_CheckExact(v) ((v)->ob_type == &PyCSimpleType_Type)
|
||||
#define PyCSimpleTypeObject_CheckExact(v) (Py_TYPE(v) == &PyCSimpleType_Type)
|
||||
#define PyCSimpleTypeObject_Check(v) PyObject_TypeCheck(v, &PyCSimpleType_Type)
|
||||
|
||||
extern PyTypeObject PyCField_Type;
|
||||
|
|
Loading…
Reference in New Issue