mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
bpo-47164: Add _PyCFunction_CAST() macro (GH-32192)
Use the macro in C files of the Python/ directory.
This commit is contained in:
parent
c14d7e4b81
commit
f0bc694856
8 changed files with 57 additions and 36 deletions
|
@ -2845,14 +2845,14 @@ hamt_py_values(PyHamtObject *self, PyObject *args)
|
|||
}
|
||||
|
||||
static PyObject *
|
||||
hamt_py_keys(PyHamtObject *self, PyObject *args)
|
||||
hamt_py_keys(PyHamtObject *self, PyObject *Py_UNUSED(args))
|
||||
{
|
||||
return _PyHamt_NewIterKeys(self);
|
||||
}
|
||||
|
||||
#ifdef Py_DEBUG
|
||||
static PyObject *
|
||||
hamt_py_dump(PyHamtObject *self, PyObject *args)
|
||||
hamt_py_dump(PyHamtObject *self, PyObject *Py_UNUSED(args))
|
||||
{
|
||||
return hamt_dump(self);
|
||||
}
|
||||
|
@ -2860,14 +2860,14 @@ hamt_py_dump(PyHamtObject *self, PyObject *args)
|
|||
|
||||
|
||||
static PyMethodDef PyHamt_methods[] = {
|
||||
{"set", (PyCFunction)hamt_py_set, METH_VARARGS, NULL},
|
||||
{"get", (PyCFunction)hamt_py_get, METH_VARARGS, NULL},
|
||||
{"delete", (PyCFunction)hamt_py_delete, METH_O, NULL},
|
||||
{"items", (PyCFunction)hamt_py_items, METH_NOARGS, NULL},
|
||||
{"keys", (PyCFunction)hamt_py_keys, METH_NOARGS, NULL},
|
||||
{"values", (PyCFunction)hamt_py_values, METH_NOARGS, NULL},
|
||||
{"set", _PyCFunction_CAST(hamt_py_set), METH_VARARGS, NULL},
|
||||
{"get", _PyCFunction_CAST(hamt_py_get), METH_VARARGS, NULL},
|
||||
{"delete", _PyCFunction_CAST(hamt_py_delete), METH_O, NULL},
|
||||
{"items", _PyCFunction_CAST(hamt_py_items), METH_NOARGS, NULL},
|
||||
{"keys", _PyCFunction_CAST(hamt_py_keys), METH_NOARGS, NULL},
|
||||
{"values", _PyCFunction_CAST(hamt_py_values), METH_NOARGS, NULL},
|
||||
#ifdef Py_DEBUG
|
||||
{"__dump__", (PyCFunction)hamt_py_dump, METH_NOARGS, NULL},
|
||||
{"__dump__", _PyCFunction_CAST(hamt_py_dump), METH_NOARGS, NULL},
|
||||
#endif
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue