mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-28 07:18:30 +00:00
Python 3.7 METH_FASTCALL backport (#406)
This commit is contained in:
parent
fec396037a
commit
83b743cf96
103 changed files with 2949 additions and 3356 deletions
20
third_party/python/Modules/clinic/_dbmmodule.inc
vendored
20
third_party/python/Modules/clinic/_dbmmodule.inc
vendored
|
@ -53,7 +53,7 @@ _dbm_dbm_get_impl(dbmobject *self, const char *key,
|
|||
Py_ssize_clean_t key_length, PyObject *default_value);
|
||||
|
||||
static PyObject *
|
||||
_dbm_dbm_get(dbmobject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_dbm_dbm_get(dbmobject *self, PyObject **args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
const char *key;
|
||||
|
@ -64,10 +64,6 @@ _dbm_dbm_get(dbmobject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnam
|
|||
&key, &key_length, &default_value)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("get", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = _dbm_dbm_get_impl(self, key, key_length, default_value);
|
||||
|
||||
exit:
|
||||
|
@ -91,7 +87,7 @@ _dbm_dbm_setdefault_impl(dbmobject *self, const char *key,
|
|||
PyObject *default_value);
|
||||
|
||||
static PyObject *
|
||||
_dbm_dbm_setdefault(dbmobject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_dbm_dbm_setdefault(dbmobject *self, PyObject **args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
const char *key;
|
||||
|
@ -102,10 +98,6 @@ _dbm_dbm_setdefault(dbmobject *self, PyObject **args, Py_ssize_t nargs, PyObject
|
|||
&key, &key_length, &default_value)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("setdefault", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = _dbm_dbm_setdefault_impl(self, key, key_length, default_value);
|
||||
|
||||
exit:
|
||||
|
@ -134,7 +126,7 @@ dbmopen_impl(PyObject *module, PyObject *filename, const char *flags,
|
|||
int mode);
|
||||
|
||||
static PyObject *
|
||||
dbmopen(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
dbmopen(PyObject *module, PyObject **args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
PyObject *filename;
|
||||
|
@ -145,13 +137,9 @@ dbmopen(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
|||
&filename, &flags, &mode)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("open", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = dbmopen_impl(module, filename, flags, mode);
|
||||
|
||||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=60482e924110a70a input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=fa1f129675b8e7e5 input=a9049054013a1b77]*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue