Skip to content

Commit

Permalink
Use zoneinfo_ZoneInfo_impl in zoneinfo_ZoneInfo__unpickle_impl
Browse files Browse the repository at this point in the history
  • Loading branch information
colesbury committed Oct 13, 2024
1 parent 282890b commit 89a8cd3
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions Modules/_zoneinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -823,14 +823,10 @@ zoneinfo_ZoneInfo__unpickle_impl(PyTypeObject *type, PyTypeObject *cls,
/*[clinic end generated code: output=556712fc709deecb input=6ac8c73eed3de316]*/
{
if (from_cache) {
PyObject *val_args = PyTuple_Pack(1, key);
if (val_args == NULL) {
return NULL;
}

PyObject *rv = zoneinfo_ZoneInfo(type, val_args, NULL);

Py_DECREF(val_args);
PyObject *rv;
Py_BEGIN_CRITICAL_SECTION(type);
rv = zoneinfo_ZoneInfo_impl(type, key);
Py_END_CRITICAL_SECTION();
return rv;
}
else {
Expand Down

0 comments on commit 89a8cd3

Please sign in to comment.