summaryrefslogtreecommitdiff
path: root/Modules/_json.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_json.c')
-rw-r--r--Modules/_json.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_json.c b/Modules/_json.c
index 3e4fe795a0..a70043b605 100644
--- a/Modules/_json.c
+++ b/Modules/_json.c
@@ -1617,7 +1617,7 @@ encoder_listencode_dict(PyEncoderObject *s, _PyAccu *acc,
else {
PyErr_Format(PyExc_TypeError,
"keys must be str, int, float, bool or None, "
- "not %.100s", key->ob_type->tp_name);
+ "not %.100s", Py_TYPE(key)->tp_name);
goto bail;
}