bpo-39573: Use Py_TYPE() macro in ctypes.h (GH-18411)

This commit is contained in:
Dong-hee Na 2020-02-09 08:45:52 +09:00 committed by GitHub
parent 0edc2c7678
commit 7f6f7eef52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -112,12 +112,12 @@ extern int PyObject_stginfo(PyObject *self, Py_ssize_t *psize, Py_ssize_t *palig
extern PyTypeObject PyCData_Type; 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_Check(v) PyObject_TypeCheck(v, &PyCData_Type)
#define _CDataObject_HasExternalBuffer(v) ((v)->b_ptr != (char *)&(v)->b_value) #define _CDataObject_HasExternalBuffer(v) ((v)->b_ptr != (char *)&(v)->b_value)
extern PyTypeObject PyCSimpleType_Type; 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) #define PyCSimpleTypeObject_Check(v) PyObject_TypeCheck(v, &PyCSimpleType_Type)
extern PyTypeObject PyCField_Type; extern PyTypeObject PyCField_Type;