[Python-checkins] r46410 - python/branches/sreifschneider-newnewexcept/Objects/exceptions.c
tim.peters
python-checkins at python.org
Fri May 26 22:06:03 CEST 2006
Author: tim.peters
Date: Fri May 26 22:06:03 2006
New Revision: 46410
Modified:
python/branches/sreifschneider-newnewexcept/Objects/exceptions.c
Log:
More Windows fixes.
Modified: python/branches/sreifschneider-newnewexcept/Objects/exceptions.c
==============================================================================
--- python/branches/sreifschneider-newnewexcept/Objects/exceptions.c (original)
+++ python/branches/sreifschneider-newnewexcept/Objects/exceptions.c Fri May 26 22:06:03 2006
@@ -855,7 +855,7 @@
Py_DECREF(tuple);
}
else
- rtnval = EnvironmentError_str((EnvironmentErrorObject *)self);
+ rtnval = EnvironmentError_str((PyEnvironmentErrorObject *)self);
finally:
Py_XDECREF(repr);
@@ -1213,8 +1213,8 @@
if (PyInt_Check(attr)) {
*value = PyInt_AS_LONG(attr);
} else if (PyLong_Check(attr)) {
- *value = PyLong_AsLongLong(attr);
- if (*value == -1)
+ *value = _PyLong_AsSsize_t(attr);
+ if (*value == -1 && PyErr_Occurred())
return -1;
} else {
PyErr_Format(PyExc_TypeError, "%.200s attribute must be int", name);
More information about the Python-checkins
mailing list