[Python-checkins] cpython: Issue #19634: Fix time_strftime() on AIX, format is a wchar_t* not a PyObject*
victor.stinner
python-checkins at python.org
Mon Nov 18 02:44:26 CET 2013
http://hg.python.org/cpython/rev/652de09a3a1a
changeset: 87238:652de09a3a1a
user: Victor Stinner <victor.stinner at gmail.com>
date: Mon Nov 18 02:43:29 2013 +0100
summary:
Issue #19634: Fix time_strftime() on AIX, format is a wchar_t* not a PyObject*
files:
Modules/timemodule.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
--- a/Modules/timemodule.c
+++ b/Modules/timemodule.c
@@ -650,7 +650,7 @@
return NULL;
}
}
-#elif defined(_AIX)
+#elif defined(_AIX) && defined(HAVE_WCSFTIME)
for(outbuf = wcschr(fmt, '%');
outbuf != NULL;
outbuf = wcschr(outbuf+2, '%'))
@@ -660,7 +660,6 @@
if (outbuf[1] == L'y' && buf.tm_year < 0) {
PyErr_SetString(PyExc_ValueError,
"format %y requires year >= 1900 on AIX");
- Py_DECREF(format);
return NULL;
}
}
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list