From: Victor Stinner Date: Mon, 18 Nov 2013 01:43:29 +0000 (+0100) Subject: Issue #19634: Fix time_strftime() on AIX, format is a wchar_t* not a PyObject* X-Git-Tag: v3.4.0b1~204 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=136f064b9375fbd0012f5644e32338d66594ac0f;p=thirdparty%2FPython%2Fcpython.git Issue #19634: Fix time_strftime() on AIX, format is a wchar_t* not a PyObject* --- diff --git a/Modules/timemodule.c b/Modules/timemodule.c index 32fe6a7c6903..ca399069948a 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -650,7 +650,7 @@ time_strftime(PyObject *self, PyObject *args) 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 @@ time_strftime(PyObject *self, PyObject *args) 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; } }