Skip to content

Commit 4596666

Browse files
authored
gh-111178: Fix function signatures for test_zoneinfo (#131664)
1 parent abcd9d4 commit 4596666

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Modules/_zoneinfo.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -2580,14 +2580,14 @@ initialize_caches(zoneinfo_state *state)
25802580
}
25812581

25822582
static PyObject *
2583-
zoneinfo_init_subclass(PyTypeObject *cls, PyObject *args, PyObject **kwargs)
2583+
zoneinfo_init_subclass(PyObject *cls, PyObject *args, PyObject *kwargs)
25842584
{
25852585
PyObject *weak_cache = new_weak_cache();
25862586
if (weak_cache == NULL) {
25872587
return NULL;
25882588
}
25892589

2590-
if (PyObject_SetAttrString((PyObject *)cls, "_weak_cache",
2590+
if (PyObject_SetAttrString(cls, "_weak_cache",
25912591
weak_cache) < 0) {
25922592
Py_DECREF(weak_cache);
25932593
return NULL;
@@ -2611,7 +2611,7 @@ static PyMethodDef zoneinfo_methods[] = {
26112611
{"__reduce__", (PyCFunction)zoneinfo_reduce, METH_NOARGS,
26122612
PyDoc_STR("Function for serialization with the pickle protocol.")},
26132613
ZONEINFO_ZONEINFO__UNPICKLE_METHODDEF
2614-
{"__init_subclass__", (PyCFunction)(void (*)(void))zoneinfo_init_subclass,
2614+
{"__init_subclass__", _PyCFunction_CAST(zoneinfo_init_subclass),
26152615
METH_VARARGS | METH_KEYWORDS | METH_CLASS,
26162616
PyDoc_STR("Function to initialize subclasses.")},
26172617
{NULL} /* Sentinel */

0 commit comments

Comments
 (0)