diff options
author | Victor Stinner <vstinner@python.org> | 2020-07-10 10:40:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-10 10:40:38 (GMT) |
commit | 8182cc2e68a3c6ea5d5342fed3f1c76b0521fbc1 (patch) | |
tree | 697757da0c635614b16aafc81c3ea1172a634a53 /PC/_msi.c | |
parent | d878349bac6c154fbfeffe7d4b38e2ddb833f135 (diff) | |
download | cpython-8182cc2e68a3c6ea5d5342fed3f1c76b0521fbc1.zip cpython-8182cc2e68a3c6ea5d5342fed3f1c76b0521fbc1.tar.gz cpython-8182cc2e68a3c6ea5d5342fed3f1c76b0521fbc1.tar.bz2 |
bpo-39573: Use the Py_TYPE() macro (GH-21433)
Replace obj->ob_type with Py_TYPE(obj).
Diffstat (limited to 'PC/_msi.c')
-rw-r--r-- | PC/_msi.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -193,7 +193,7 @@ static FNFCIGETNEXTCABINET(cb_getnextcabinet) if (!PyBytes_Check(result)) { PyErr_Format(PyExc_TypeError, "Incorrect return type %s from getnextcabinet", - result->ob_type->tp_name); + Py_TYPE(result)->tp_name); Py_DECREF(result); return FALSE; } @@ -879,7 +879,7 @@ _msi_View_Execute(msiobj *self, PyObject *oparams) MSIHANDLE params = 0; if (oparams != Py_None) { - if (oparams->ob_type != &record_Type) { + if (!Py_IS_TYPE(oparams, &record_Type)) { PyErr_SetString(PyExc_TypeError, "Execute argument must be a record"); return NULL; } @@ -955,7 +955,7 @@ _msi_View_Modify_impl(msiobj *self, int kind, PyObject *data) { int status; - if (data->ob_type != &record_Type) { + if (!Py_IS_TYPE(data, &record_Type)) { PyErr_SetString(PyExc_TypeError, "Modify expects a record object"); return NULL; } |