mirror of
https://github.com/python/cpython.git
synced 2025-08-23 10:16:01 +00:00
bpo-39573: Use Py_TYPE() macro in Python and Include directories (GH-18391)
Replace direct access to PyObject.ob_type with Py_TYPE().
This commit is contained in:
parent
38aaaaac80
commit
a102ed7d2f
12 changed files with 39 additions and 39 deletions
|
@ -1447,7 +1447,7 @@ _PyUnicode_FormatAdvancedWriter(_PyUnicodeWriter *writer,
|
|||
return format_string_internal(obj, &format, writer);
|
||||
default:
|
||||
/* unknown */
|
||||
unknown_presentation_type(format.type, obj->ob_type->tp_name);
|
||||
unknown_presentation_type(format.type, Py_TYPE(obj)->tp_name);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
@ -1505,7 +1505,7 @@ _PyLong_FormatAdvancedWriter(_PyUnicodeWriter *writer,
|
|||
|
||||
default:
|
||||
/* unknown */
|
||||
unknown_presentation_type(format.type, obj->ob_type->tp_name);
|
||||
unknown_presentation_type(format.type, Py_TYPE(obj)->tp_name);
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
@ -1549,7 +1549,7 @@ _PyFloat_FormatAdvancedWriter(_PyUnicodeWriter *writer,
|
|||
|
||||
default:
|
||||
/* unknown */
|
||||
unknown_presentation_type(format.type, obj->ob_type->tp_name);
|
||||
unknown_presentation_type(format.type, Py_TYPE(obj)->tp_name);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
@ -1587,7 +1587,7 @@ _PyComplex_FormatAdvancedWriter(_PyUnicodeWriter *writer,
|
|||
|
||||
default:
|
||||
/* unknown */
|
||||
unknown_presentation_type(format.type, obj->ob_type->tp_name);
|
||||
unknown_presentation_type(format.type, Py_TYPE(obj)->tp_name);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue