mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-39573: Use Py_TYPE() macro in Modules directory (GH-18393)
Replace direct access to PyObject.ob_type with Py_TYPE().
This commit is contained in:
parent
58ac700fb0
commit
daa9756cb6
26 changed files with 40 additions and 40 deletions
|
@ -833,7 +833,7 @@ typedef struct {
|
|||
} PyTclObject;
|
||||
|
||||
static PyObject *PyTclObject_Type;
|
||||
#define PyTclObject_Check(v) ((v)->ob_type == (PyTypeObject *) PyTclObject_Type)
|
||||
#define PyTclObject_Check(v) (Py_TYPE(v) == (PyTypeObject *) PyTclObject_Type)
|
||||
|
||||
static PyObject *
|
||||
newPyTclObject(Tcl_Obj *arg)
|
||||
|
@ -1734,7 +1734,7 @@ varname_converter(PyObject *in, void *_out)
|
|||
}
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"must be str, bytes or Tcl_Obj, not %.50s",
|
||||
in->ob_type->tp_name);
|
||||
Py_TYPE(in)->tp_name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue