gh-83754: Use the Py_TYPE() macro (#120599)

Don't access directly PyObject.ob_type, but use the Py_TYPE() macro
instead.
This commit is contained in:
Victor Stinner 2024-06-17 10:34:29 +02:00 committed by GitHub
parent 3df2022931
commit c2d5df5787
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 12 additions and 12 deletions

View file

@ -3090,7 +3090,7 @@ static PyDateTime_Delta *
look_up_delta(int days, int seconds, int microseconds, PyTypeObject *type)
{
if (days == 0 && seconds == 0 && microseconds == 0
&& type == zero_delta.ob_base.ob_type)
&& type == Py_TYPE(&zero_delta))
{
return &zero_delta;
}