Skip to content

Commit

Permalink
pythongh-114388: Fix an error in pythonGH-114391
Browse files Browse the repository at this point in the history
  • Loading branch information
serhiy-storchaka committed Feb 4, 2024
1 parent 3ddc515 commit 4e3c377
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Python/structmember.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ PyMember_SetOne(char *addr, PyMemberDef *l, PyObject *v)
if (overflow < 0) {
PyErr_SetString(PyExc_OverflowError,
"Python int too large to convert to C long");
return -1;
}
else if (!overflow) {
*(unsigned int *)addr = (unsigned int)(unsigned long)long_val;
Expand Down Expand Up @@ -247,6 +248,7 @@ PyMember_SetOne(char *addr, PyMemberDef *l, PyObject *v)
if (overflow < 0) {
PyErr_SetString(PyExc_OverflowError,
"Python int too large to convert to C long");
return -1;
}
else if (!overflow) {
*(unsigned long *)addr = (unsigned long)long_val;
Expand Down

0 comments on commit 4e3c377

Please sign in to comment.