summaryrefslogtreecommitdiffstats
path: root/Python/bltinmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r--Python/bltinmodule.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index cdb1eaa..980b810 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -170,7 +170,7 @@ builtin___build_class__(PyObject *self, PyObject *const *args, Py_ssize_t nargs,
/* else get the type of the first base */
else {
PyObject *base0 = PyTuple_GET_ITEM(bases, 0);
- meta = (PyObject *) (base0->ob_type);
+ meta = (PyObject *)Py_TYPE(base0);
}
Py_INCREF(meta);
isclass = 1; /* meta is really a class */
@@ -1002,13 +1002,13 @@ builtin_exec_impl(PyObject *module, PyObject *source, PyObject *globals,
if (!PyDict_Check(globals)) {
PyErr_Format(PyExc_TypeError, "exec() globals must be a dict, not %.100s",
- globals->ob_type->tp_name);
+ Py_TYPE(globals)->tp_name);
return NULL;
}
if (!PyMapping_Check(locals)) {
PyErr_Format(PyExc_TypeError,
"locals must be a mapping or None, not %.100s",
- locals->ob_type->tp_name);
+ Py_TYPE(locals)->tp_name);
return NULL;
}
if (_PyDict_GetItemIdWithError(globals, &PyId___builtins__) == NULL) {
@@ -1383,11 +1383,11 @@ builtin_next(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
if (!PyIter_Check(it)) {
PyErr_Format(PyExc_TypeError,
"'%.200s' object is not an iterator",
- it->ob_type->tp_name);
+ Py_TYPE(it)->tp_name);
return NULL;
}
- res = (*it->ob_type->tp_iternext)(it);
+ res = (*Py_TYPE(it)->tp_iternext)(it);
if (res != NULL) {
return res;
} else if (nargs > 1) {
@@ -1788,7 +1788,7 @@ builtin_ord(PyObject *module, PyObject *c)
else {
PyErr_Format(PyExc_TypeError,
"ord() expected string of length 1, but " \
- "%.200s found", c->ob_type->tp_name);
+ "%.200s found", Py_TYPE(c)->tp_name);
return NULL;
}
@@ -1856,7 +1856,7 @@ builtin_print(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject
else if (sep && !PyUnicode_Check(sep)) {
PyErr_Format(PyExc_TypeError,
"sep must be None or a string, not %.200s",
- sep->ob_type->tp_name);
+ Py_TYPE(sep)->tp_name);
return NULL;
}
if (end == Py_None) {
@@ -1865,7 +1865,7 @@ builtin_print(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject
else if (end && !PyUnicode_Check(end)) {
PyErr_Format(PyExc_TypeError,
"end must be None or a string, not %.200s",
- end->ob_type->tp_name);
+ Py_TYPE(end)->tp_name);
return NULL;
}