There was an error while loading. Please reload this page.
1 parent 7f413a5 commit 71f2ff4Copy full SHA for 71f2ff4
1 file changed
Python/compile.c
@@ -6100,13 +6100,11 @@ fold_tuple_on_constants(struct instr *inst,
6100
PyTuple_SET_ITEM(newconst, i, constant);
6101
}
6102
Py_ssize_t index = PyList_GET_SIZE(consts);
6103
-#if SIZEOF_SIZE_T > SIZEOF_INT
6104
- if ((size_t)index >= UINT_MAX - 1) {
+ if ((size_t)index >= (size_t)INT_MAX - 1) {
6105
Py_DECREF(newconst);
6106
PyErr_SetString(PyExc_OverflowError, "too many constants");
6107
return -1;
6108
6109
-#endif
6110
if (PyList_Append(consts, newconst)) {
6111
6112
@@ -6116,7 +6114,7 @@ fold_tuple_on_constants(struct instr *inst,
6116
6114
inst[i].i_opcode = NOP;
6117
6115
6118
inst[n].i_opcode = LOAD_CONST;
6119
- inst[n].i_oparg = index;
+ inst[n].i_oparg = (int)index;
6120
return 0;
6121
6122
0 commit comments