diff options
author | Victor Stinner <vstinner@python.org> | 2020-02-07 01:24:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-07 01:24:48 (GMT) |
commit | a102ed7d2f0e7e05438f14d5fb72ca0358602249 (patch) | |
tree | a5a3aca7a251c82d7b35c130cc913d6009baa18a /Python/_warnings.c | |
parent | 38aaaaac805fa30870e2d093e52a900dddde3b34 (diff) | |
download | cpython-a102ed7d2f0e7e05438f14d5fb72ca0358602249.zip cpython-a102ed7d2f0e7e05438f14d5fb72ca0358602249.tar.gz cpython-a102ed7d2f0e7e05438f14d5fb72ca0358602249.tar.bz2 |
bpo-39573: Use Py_TYPE() macro in Python and Include directories (GH-18391)
Replace direct access to PyObject.ob_type with Py_TYPE().
Diffstat (limited to 'Python/_warnings.c')
-rw-r--r-- | Python/_warnings.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c index 602211c..9e8b52d 100644 --- a/Python/_warnings.c +++ b/Python/_warnings.c @@ -650,7 +650,7 @@ warn_explicit(PyObject *category, PyObject *message, text = PyObject_Str(message); if (text == NULL) goto cleanup; - category = (PyObject*)message->ob_type; + category = (PyObject*)Py_TYPE(message); } else { text = message; @@ -906,7 +906,7 @@ get_category(PyObject *message, PyObject *category) return NULL; if (rc == 1) - category = (PyObject*)message->ob_type; + category = (PyObject*)Py_TYPE(message); else if (category == NULL || category == Py_None) category = PyExc_UserWarning; |