summaryrefslogtreecommitdiffstats
path: root/Python/formatter_unicode.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-02-07 01:24:48 (GMT)
committerGitHub <noreply@github.com>2020-02-07 01:24:48 (GMT)
commita102ed7d2f0e7e05438f14d5fb72ca0358602249 (patch)
treea5a3aca7a251c82d7b35c130cc913d6009baa18a /Python/formatter_unicode.c
parent38aaaaac805fa30870e2d093e52a900dddde3b34 (diff)
downloadcpython-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/formatter_unicode.c')
-rw-r--r--Python/formatter_unicode.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/formatter_unicode.c b/Python/formatter_unicode.c
index 7c4ecf0..41a2478 100644
--- a/Python/formatter_unicode.c
+++ b/Python/formatter_unicode.c
@@ -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;
}
}