mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
Remove _PyArg_NoStackKeywords(). (#2641)
This commit is contained in:
parent
bb2bae84d6
commit
7e60192fe0
3 changed files with 2 additions and 27 deletions
|
@ -2483,7 +2483,6 @@ _PyArg_UnpackStack(PyObject **args, Py_ssize_t nargs, const char *name,
|
|||
|
||||
|
||||
#undef _PyArg_NoKeywords
|
||||
#undef _PyArg_NoStackKeywords
|
||||
#undef _PyArg_NoPositional
|
||||
|
||||
/* For type constructors that don't take keyword args
|
||||
|
@ -2511,23 +2510,6 @@ _PyArg_NoKeywords(const char *funcname, PyObject *kwargs)
|
|||
}
|
||||
|
||||
|
||||
int
|
||||
_PyArg_NoStackKeywords(const char *funcname, PyObject *kwnames)
|
||||
{
|
||||
if (kwnames == NULL) {
|
||||
return 1;
|
||||
}
|
||||
assert(PyTuple_CheckExact(kwnames));
|
||||
if (PyTuple_GET_SIZE(kwnames) == 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
|
||||
funcname);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
_PyArg_NoPositional(const char *funcname, PyObject *args)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue