8000 gh-111178: Fix function signatures for test_zoneinfo by vstinner · Pull Request #131664 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-111178: Fix function signatures for test_zoneinfo #131664

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-111178: Fix function signatures for test_zoneinfo
  • Loading branch information
vstinner committed Mar 24, 2025
commit 00cd1e13138bfb6fed35118c810676fb22e4dc94
6 changes: 3 additions & 3 deletions Modules/_zoneinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -2580,14 +2580,14 @@ initialize_caches(zoneinfo_state *state)
}

static PyObject *
zoneinfo_init_subclass(PyTypeObject *cls, PyObject *args, PyObject **kwargs)
zoneinfo_init_subclass(PyObject *cls, PyObject *args, PyObject *kwargs)
{
PyObject *weak_cache = new_weak_cache();
if (weak_cache == NULL) {
return NULL;
}

if (PyObject_SetAttrString((PyObject *)cls, "_weak_cache",
if (PyObject_SetAttrString(cls, "_weak_cache",
weak_cache) < 0) {
Py_DECREF(weak_cache);
return NULL;
Expand All @@ -2611,7 +2611,7 @@ static PyMethodDef zoneinfo_methods[] = {
{"__reduce__", (PyCFunction)zoneinfo_reduce, METH_NOARGS,
PyDoc_STR("Function for serialization with the pickle protocol.")},
ZONEINFO_ZONEINFO__UNPICKLE_METHODDEF
{"__init_subclass__", (PyCFunction)(void (*)(void))zoneinfo_init_subclass,
{"__init_subclass__", _PyCFunction_CAST(zoneinfo_init_subclass),
METH_VARARGS | METH_KEYWORDS | METH_CLASS,
PyDoc_STR("Function to initialize subclasses.")},
{NULL} /* Sentinel */
Expand Down
Loading
0