Issue #19634: Fix time_strftime() on AIX, format is a wchar_t* not a PyObject*

This commit is contained in:
Victor Stinner 2013-11-18 02:43:29 +01:00
parent 3287905335
commit 136f064b93
1 changed files with 1 additions and 2 deletions

View File

@ -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;
}
}