summaryrefslogtreecommitdiffstats
path: root/Include/listobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/listobject.h')
-rw-r--r--Include/listobject.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Include/listobject.h b/Include/listobject.h
index db3124e..e8b192a 100644
--- a/Include/listobject.h
+++ b/Include/listobject.h
@@ -41,8 +41,8 @@ typedef struct {
PyAPI_DATA(PyTypeObject) PyList_Type;
#define PyList_Check(op) \
- PyType_FastSubclass((op)->ob_type, Py_TPFLAGS_LIST_SUBCLASS)
-#define PyList_CheckExact(op) ((op)->ob_type == &PyList_Type)
+ PyType_FastSubclass(Py_Type(op), Py_TPFLAGS_LIST_SUBCLASS)
+#define PyList_CheckExact(op) (Py_Type(op) == &PyList_Type)
PyAPI_FUNC(PyObject *) PyList_New(Py_ssize_t size);
PyAPI_FUNC(Py_ssize_t) PyList_Size(PyObject *);
@@ -60,7 +60,7 @@ PyAPI_FUNC(PyObject *) _PyList_Extend(PyListObject *, PyObject *);
/* Macro, trading safety for speed */
#define PyList_GET_ITEM(op, i) (((PyListObject *)(op))->ob_item[i])
#define PyList_SET_ITEM(op, i, v) (((PyListObject *)(op))->ob_item[i] = (v))
-#define PyList_GET_SIZE(op) (((PyListObject *)(op))->ob_size)
+#define PyList_GET_SIZE(op) Py_Size(op)
#ifdef __cplusplus
}