[Python-checkins] r45777 - python/trunk/Python/structmember.c
neal.norwitz
python-checkins at python.org
Fri Apr 28 07:28:54 CEST 2006
Author: neal.norwitz
Date: Fri Apr 28 07:28:54 2006
New Revision: 45777
Modified:
python/trunk/Python/structmember.c
Log:
Fix a warning on ppc (debian)
Modified: python/trunk/Python/structmember.c
==============================================================================
--- python/trunk/Python/structmember.c (original)
+++ python/trunk/Python/structmember.c Fri Apr 28 07:28:54 2006
@@ -260,8 +260,9 @@
PyErr_BadArgument();
return -1;
} else {
- *(PY_LONG_LONG*)addr = PyLong_AsLongLong(v);
- if ((*addr == -1) && PyErr_Occurred()) {
+ PY_LONG_LONG value;
+ *(PY_LONG_LONG*)addr = value = PyLong_AsLongLong(v);
+ if ((value == -1) && PyErr_Occurred()) {
return -1;
}
}
@@ -271,8 +272,10 @@
PyErr_BadArgument();
return -1;
} else {
- *(unsigned PY_LONG_LONG*)addr = PyLong_AsUnsignedLongLong(v);
- if ((*addr == -1) && PyErr_Occurred()) {
+ unsigned PY_LONG_LONG value;
+ *(unsigned PY_LONG_LONG*)addr = value = PyLong_AsUnsignedLongLong(v);
+ if ((value == (unsigned PY_LONG_LONG)-1) &&
+ PyErr_Occurred()) {
return -1;
}
}
More information about the Python-checkins
mailing list