Kaydet (Commit) 58dc03c7 authored tarafından Paul Ganssle's avatar Paul Ganssle Kaydeden (comit) Victor Stinner

Cleanup dangling reference in get_timezone_utc_capi (#5317)

üst 2812d3d9
...@@ -2300,8 +2300,10 @@ get_timezone_utc_capi(PyObject* self, PyObject *args) { ...@@ -2300,8 +2300,10 @@ get_timezone_utc_capi(PyObject* self, PyObject *args) {
return NULL; return NULL;
} }
if (macro) { if (macro) {
Py_INCREF(PyDateTime_TimeZone_UTC);
return PyDateTime_TimeZone_UTC; return PyDateTime_TimeZone_UTC;
} else { } else {
Py_INCREF(PyDateTimeAPI->TimeZone_UTC);
return PyDateTimeAPI->TimeZone_UTC; return PyDateTimeAPI->TimeZone_UTC;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment