summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/Objects/longobject.c
diff options
context:
space:
mode:
authorshadchin <[email protected]>2026-02-07 19:56:35 +0300
committershadchin <[email protected]>2026-02-07 20:23:53 +0300
commit19d43a3e6fb4cb8ea11747d7d7bca7a3542fbb44 (patch)
tree0b1418938140a0b6470953bef6069454ffdf1bd0 /contrib/tools/python3/Objects/longobject.c
parent0879409bfc0891ab8103828a3bdbf0e960475fec (diff)
Update Python 3 to 3.13.12
commit_hash:71d3efea437a769b2b7910d196120bb02587046e
Diffstat (limited to 'contrib/tools/python3/Objects/longobject.c')
-rw-r--r--contrib/tools/python3/Objects/longobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/tools/python3/Objects/longobject.c b/contrib/tools/python3/Objects/longobject.c
index 23f50c7ed28..06d9ae4742f 100644
--- a/contrib/tools/python3/Objects/longobject.c
+++ b/contrib/tools/python3/Objects/longobject.c
@@ -4324,10 +4324,10 @@ pylong_int_divmod(PyLongObject *v, PyLongObject *w,
if (result == NULL) {
return -1;
}
- if (!PyTuple_Check(result)) {
+ if (!PyTuple_Check(result) || PyTuple_GET_SIZE(result) != 2) {
Py_DECREF(result);
PyErr_SetString(PyExc_ValueError,
- "tuple is required from int_divmod()");
+ "tuple of length 2 is required from int_divmod()");
return -1;
}
PyObject *q = PyTuple_GET_ITEM(result, 0);