mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
Convert more modules to METH_VARARGS.
This commit is contained in:
parent
96a8c3954c
commit
bf92f46572
8 changed files with 139 additions and 113 deletions
|
@ -108,8 +108,8 @@ sp_handle_dealloc(sp_handle_object* self)
|
|||
}
|
||||
|
||||
static PyMethodDef sp_handle_methods[] = {
|
||||
{"Detach", (PyCFunction) sp_handle_detach, 1},
|
||||
{"Close", (PyCFunction) sp_handle_close, 1},
|
||||
{"Detach", (PyCFunction) sp_handle_detach, METH_VARARGS},
|
||||
{"Close", (PyCFunction) sp_handle_close, METH_VARARGS},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ ex_foo(PyObject *self, PyObject *args)
|
|||
}
|
||||
|
||||
static PyMethodDef example_methods[] = {
|
||||
{"foo", ex_foo, 1, "foo() doc string"},
|
||||
{"foo", ex_foo, METH_VARARGS, "foo() doc string"},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue