summaryrefslogtreecommitdiffstats
path: root/Modules/timemodule.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-11-18 01:43:29 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-11-18 01:43:29 (GMT)
commit136f064b9375fbd0012f5644e32338d66594ac0f (patch)
tree7bce2e1a866bd1ea6e3dafaf6c46db75a1fc9a94 /Modules/timemodule.c
parent32879053357de0fb143e0b335eec1fc6b27e07bc (diff)
downloadcpython-136f064b9375fbd0012f5644e32338d66594ac0f.zip
cpython-136f064b9375fbd0012f5644e32338d66594ac0f.tar.gz
cpython-136f064b9375fbd0012f5644e32338d66594ac0f.tar.bz2
Issue #19634: Fix time_strftime() on AIX, format is a wchar_t* not a PyObject*
Diffstat (limited to 'Modules/timemodule.c')
-rw-r--r--Modules/timemodule.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
index 32fe6a7..ca39906 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;
}
}