mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
gh-111178: Fix function signatures for test_zoneinfo (#131664)
This commit is contained in:
parent
abcd9d4f7d
commit
4596666a9f
1 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue