#endif /* HAVE_MKTIME */
#ifdef HAVE_WORKING_TZSET
-static int PyInit_timezone(PyObject *module);
+static int init_timezone(PyObject *module);
static PyObject *
time_tzset(PyObject *self, PyObject *unused)
tzset();
/* Reset timezone, altzone, daylight and tzname */
- if (PyInit_timezone(m) < 0) {
+ if (init_timezone(m) < 0) {
return NULL;
}
Py_DECREF(m);
#endif // !HAVE_DECL_TZNAME
static int
-PyInit_timezone(PyObject *m)
+init_timezone(PyObject *m)
{
assert(!PyErr_Occurred());
return NULL;
/* Set, or reset, module variables like time.timezone */
- if (PyInit_timezone(m) < 0) {
+ if (init_timezone(m) < 0) {
return NULL;
}
utc_string = tm.tm_zone;
#endif
+ if (PyErr_Occurred()) {
+ return NULL;
+ }
return m;
}