@@ -84,7 +84,7 @@ descr_check(PyDescrObject *descr, PyObject *obj, PyObject **pres)
84
84
"doesn't apply to a '%.100s' object" ,
85
85
descr_name ((PyDescrObject * )descr ), "?" ,
86
86
descr -> d_type -> tp_name ,
87
- obj -> ob_type -> tp_name );
87
+ Py_TYPE ( obj ) -> tp_name );
88
88
* pres = NULL ;
89
89
return 1 ;
90
90
}
@@ -97,7 +97,7 @@ classmethod_get(PyMethodDescrObject *descr, PyObject *obj, PyObject *type)
97
97
/* Ensure a valid type. Class methods ignore obj. */
98
98
if (type == NULL ) {
99
99
if (obj != NULL )
100
- type = (PyObject * )obj -> ob_type ;
100
+ type = (PyObject * )Py_TYPE ( obj ) ;
101
101
else {
102
102
/* Wot - no type?! */
103
103
PyErr_Format (PyExc_TypeError ,
@@ -114,7 +114,7 @@ classmethod_get(PyMethodDescrObject *descr, PyObject *obj, PyObject *type)
114
114
"needs a type, not a '%.100s' as arg 2" ,
115
115
descr_name ((PyDescrObject * )descr ), "?" ,
116
116
PyDescr_TYPE (descr )-> tp_name ,
117
- type -> ob_type -> tp_name );
117
+ Py_TYPE ( type ) -> tp_name );
118
118
return NULL ;
119
119
}
120
120
if (!PyType_IsSubtype ((PyTypeObject * )type , PyDescr_TYPE (descr ))) {
@@ -194,7 +194,7 @@ descr_setcheck(PyDescrObject *descr, PyObject *obj, PyObject *value,
194
194
"doesn't apply to a '%.100s' object" ,
195
195
descr_name (descr ), "?" ,
196
196
descr -> d_type -> tp_name ,
197
- obj -> ob_type -> tp_name );
197
+ Py_TYPE ( obj ) -> tp_name );
198
198
* pres = -1 ;
199
199
return 1 ;
200
200
}
@@ -506,7 +506,7 @@ wrapperdescr_call(PyWrapperDescrObject *descr, PyObject *args, PyObject *kwds)
506
506
"but received a '%.100s'" ,
507
507
descr_name ((PyDescrObject * )descr ), "?" ,
508
508
PyDescr_TYPE (descr )-> tp_name ,
509
- self -> ob_type -> tp_name );
509
+ Py_TYPE ( self ) -> tp_name );
510
510
return NULL ;
511
511
}
512
512
@@ -1234,7 +1234,7 @@ wrapper_repr(wrapperobject *wp)
1234
1234
{
1235
1235
return PyUnicode_FromFormat ("<method-wrapper '%s' of %s object at %p>" ,
1236
1236
wp -> descr -> d_base -> name ,
1237
- wp -> self -> ob_type -> tp_name ,
1237
+ Py_TYPE ( wp -> self ) -> tp_name ,
1238
1238
wp -> self );
1239
1239
}
1240
1240
@@ -1476,7 +1476,7 @@ property_dealloc(PyObject *self)
1476
1476
Py_XDECREF (gs -> prop_set );
1477
1477
Py_XDECREF (gs -> prop_del );
1478
1478
Py_XDECREF (gs -> prop_doc );
1479
- self -> ob_type -> tp_free (self );
1479
+ Py_TYPE ( self ) -> tp_free (self );
1480
1480
}
1481
1481
1482
1482
static PyObject *
0 commit comments