mirror of
https://github.com/python/cpython.git
synced 2025-10-22 14:42:22 +00:00
gh-114388: Fix an error in GH-114391 (GH-115000)
This commit is contained in:
parent
7e42fddf60
commit
d466052ad4
1 changed files with 2 additions and 0 deletions
|
@ -208,6 +208,7 @@ PyMember_SetOne(char *addr, PyMemberDef *l, PyObject *v)
|
||||||
if (overflow < 0) {
|
if (overflow < 0) {
|
||||||
PyErr_SetString(PyExc_OverflowError,
|
PyErr_SetString(PyExc_OverflowError,
|
||||||
"Python int too large to convert to C long");
|
"Python int too large to convert to C long");
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
else if (!overflow) {
|
else if (!overflow) {
|
||||||
*(unsigned int *)addr = (unsigned int)(unsigned long)long_val;
|
*(unsigned int *)addr = (unsigned int)(unsigned long)long_val;
|
||||||
|
@ -247,6 +248,7 @@ PyMember_SetOne(char *addr, PyMemberDef *l, PyObject *v)
|
||||||
if (overflow < 0) {
|
if (overflow < 0) {
|
||||||
PyErr_SetString(PyExc_OverflowError,
|
PyErr_SetString(PyExc_OverflowError,
|
||||||
"Python int too large to convert to C long");
|
"Python int too large to convert to C long");
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
else if (!overflow) {
|
else if (!overflow) {
|
||||||
*(unsigned long *)addr = (unsigned long)long_val;
|
*(unsigned long *)addr = (unsigned long)long_val;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue