summaryrefslogtreecommitdiffstats
path: root/Modules/timemodule.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2007-12-04 22:10:37 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2007-12-04 22:10:37 (GMT)
commitd1a1d1ed802187cd1a9a8a95ac5d758c7acffee6 (patch)
tree17489e6ea4df32ba3b3bbda6e4b31155a460f265 /Modules/timemodule.c
parent0fbab7ff8d2efd92e222fcc13c0aff0998c3c158 (diff)
downloadcpython-d1a1d1ed802187cd1a9a8a95ac5d758c7acffee6.zip
cpython-d1a1d1ed802187cd1a9a8a95ac5d758c7acffee6.tar.gz
cpython-d1a1d1ed802187cd1a9a8a95ac5d758c7acffee6.tar.bz2
Remove PyInt_CheckExact. Add PyLong_AsLongAndOverflow.
Diffstat (limited to 'Modules/timemodule.c')
-rw-r--r--Modules/timemodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
index 4196381..c64a356 100644
--- a/Modules/timemodule.c
+++ b/Modules/timemodule.c
@@ -392,8 +392,8 @@ gettmarg(PyObject *args, struct tm *p)
if (y < 1900) {
PyObject *accept = PyDict_GetItemString(moddict,
"accept2dyear");
- if (accept == NULL || !PyInt_CheckExact(accept) ||
- PyLong_AsLong(accept) == 0) {
+ if (accept == NULL || !PyLong_CheckExact(accept) ||
+ !PyObject_IsTrue(accept)) {
PyErr_SetString(PyExc_ValueError,
"year >= 1900 required");
return 0;