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

Skip to content

gh-111178: Fix function signatures for test_types #131455

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 2 commits into from
Mar 19, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
gh-111178: Fix function signatures for test_types
  • Loading branch information
vstinner committed Mar 19, 2025
commit 511581a22d9ce9d879f1561a93618ae2a5a2e2be
5 changes: 3 additions & 2 deletions Objects/namespaceobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,9 @@ namespace_richcompare(PyObject *self, PyObject *other, int op)
PyDoc_STRVAR(namespace_reduce__doc__, "Return state information for pickling");

static PyObject *
namespace_reduce(_PyNamespaceObject *ns, PyObject *Py_UNUSED(ignored))
namespace_reduce(PyObject *op, PyObject *Py_UNUSED(ignored))
{
_PyNamespaceObject *ns = (_PyNamespaceObject*)op;
PyObject *result, *args = PyTuple_New(0);

if (!args)
Expand Down Expand Up @@ -245,7 +246,7 @@ namespace_replace(PyObject *self, PyObject *args, PyObject *kwargs)


static PyMethodDef namespace_methods[] = {
{"__reduce__", (PyCFunction)namespace_reduce, METH_NOARGS,
{"__reduce__", namespace_reduce, METH_NOARGS,
namespace_reduce__doc__},
{"__replace__", _PyCFunction_CAST(namespace_replace), METH_VARARGS|METH_KEYWORDS,
PyDoc_STR("__replace__($self, /, **changes)\n--\n\n"
Expand Down
8 changes: 5 additions & 3 deletions Objects/odictobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -1883,8 +1883,9 @@ odictiter_new(PyODictObject *od, int kind)
/* keys() */

static PyObject *
odictkeys_iter(_PyDictViewObject *dv)
odictkeys_iter(PyObject *op)
{
_PyDictViewObject *dv = (_PyDictViewObject*)op;
if (dv->dv_dict == NULL) {
Py_RETURN_NONE;
}
Expand Down Expand Up @@ -1934,7 +1935,7 @@ PyTypeObject PyODictKeys_Type = {
0, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
(getiterfunc)odictkeys_iter, /* tp_iter */
odictkeys_iter, /* tp_iter */
0, /* tp_iternext */
8000 odictkeys_methods, /* tp_methods */
0, /* tp_members */
Expand All @@ -1951,8 +1952,9 @@ odictkeys_new(PyObject *od, PyObject *Py_UNUSED(ignored))
/* items() */

static PyObject *
odictitems_iter(_PyDictViewObject *dv)
odictitems_iter(PyObject *op)
{
_PyDictViewObject *dv = (_PyDictViewObject*)op;
if (dv->dv_dict == NULL) {
Py_RETURN_NONE;
}
Expand Down
6 changes: 4 additions & 2 deletions Python/Python-tokenize.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,9 @@ _get_col_offsets(tokenizeriterobject *it, struct token token, const char *line_s
}

static PyObject *
tokenizeriter_next(tokenizeriterobject *it)
tokenizeriter_next(PyObject *op)
{
tokenizeriterobject *it = (tokenizeriterobject*)op;
PyObject* result = NULL;

Py_BEGIN_CRITICAL_SECTION( 719E it);
Expand Down Expand Up @@ -348,8 +349,9 @@ tokenizeriter_next(tokenizeriterobject *it)
}

static void
tokenizeriter_dealloc(tokenizeriterobject *it)
tokenizeriter_dealloc(PyObject *op)
{
tokenizeriterobject *it = (tokenizeriterobject*)op;
PyTypeObject *tp = Py_TYPE(it);
Py_XDECREF(it->last_line);
_PyTokenizer_Free(it->tok);
Expand Down
Loading
0