summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_decimal/_decimal.c2
-rw-r--r--Modules/_json.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c
index 51aed2c..d977b14 100644
--- a/Modules/_decimal/_decimal.c
+++ b/Modules/_decimal/_decimal.c
@@ -5390,7 +5390,7 @@ static PyTypeObject PyDecContext_Type =
0, /* tp_as_mapping */
(hashfunc) 0, /* tp_hash */
0, /* tp_call */
- (reprfunc) context_repr, /* tp_str */
+ 0, /* tp_str */
(getattrofunc) context_getattr, /* tp_getattro */
(setattrofunc) context_setattr, /* tp_setattro */
(PyBufferProcs *) 0, /* tp_as_buffer */
diff --git a/Modules/_json.c b/Modules/_json.c
index 2d7c1bf..4faa9cc 100644
--- a/Modules/_json.c
+++ b/Modules/_json.c
@@ -1482,7 +1482,7 @@ encoder_listencode_obj(PyEncoderObject *s, _PyAccu *acc,
return _steal_accumulate(acc, encoded);
}
else if (PyLong_Check(obj)) {
- PyObject *encoded = PyLong_Type.tp_str(obj);
+ PyObject *encoded = PyLong_Type.tp_repr(obj);
if (encoded == NULL)
return -1;
return _steal_accumulate(acc, encoded);
@@ -1646,7 +1646,7 @@ encoder_listencode_dict(PyEncoderObject *s, _PyAccu *acc,
goto bail;
}
else if (PyLong_Check(key)) {
- kstr = PyLong_Type.tp_str(key);
+ kstr = PyLong_Type.tp_repr(key);
if (kstr == NULL) {
goto bail;
}