summaryrefslogtreecommitdiffstats
path: root/Python/clinic/import.c.h
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-01-17 01:21:47 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2017-01-17 01:21:47 (GMT)
commit0c4a828cadfccd8b95a39f7930705de75ed5f729 (patch)
tree713eeceb5c63f4324fa83e9603a0284272e9eb58 /Python/clinic/import.c.h
parent093119e4eb8424451ef24a5a5a3ce9881d77abd5 (diff)
downloadcpython-0c4a828cadfccd8b95a39f7930705de75ed5f729.zip
cpython-0c4a828cadfccd8b95a39f7930705de75ed5f729.tar.gz
cpython-0c4a828cadfccd8b95a39f7930705de75ed5f729.tar.bz2
Run Argument Clinic: METH_VARARGS=>METH_FASTCALL
Issue #29286. Run Argument Clinic to get the new faster METH_FASTCALL calling convention for functions using "boring" positional arguments. Manually fix _elementtree: _elementtree_XMLParser_doctype() must remain consistent with the clinic code.
Diffstat (limited to 'Python/clinic/import.c.h')
-rw-r--r--Python/clinic/import.c.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/Python/clinic/import.c.h b/Python/clinic/import.c.h
index 6ee9120..0165b7c 100644
--- a/Python/clinic/import.c.h
+++ b/Python/clinic/import.c.h
@@ -273,23 +273,27 @@ PyDoc_STRVAR(_imp_create_dynamic__doc__,
"Create an extension module.");
#define _IMP_CREATE_DYNAMIC_METHODDEF \
- {"create_dynamic", (PyCFunction)_imp_create_dynamic, METH_VARARGS, _imp_create_dynamic__doc__},
+ {"create_dynamic", (PyCFunction)_imp_create_dynamic, METH_FASTCALL, _imp_create_dynamic__doc__},
static PyObject *
_imp_create_dynamic_impl(PyObject *module, PyObject *spec, PyObject *file);
static PyObject *
-_imp_create_dynamic(PyObject *module, PyObject *args)
+_imp_create_dynamic(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
PyObject *spec;
PyObject *file = NULL;
- if (!PyArg_UnpackTuple(args, "create_dynamic",
+ if (!_PyArg_UnpackStack(args, nargs, "create_dynamic",
1, 2,
&spec, &file)) {
goto exit;
}
+
+ if (!_PyArg_NoStackKeywords("create_dynamic", kwnames)) {
+ goto exit;
+ }
return_value = _imp_create_dynamic_impl(module, spec, file);
exit:
@@ -365,4 +369,4 @@ exit:
#ifndef _IMP_EXEC_DYNAMIC_METHODDEF
#define _IMP_EXEC_DYNAMIC_METHODDEF
#endif /* !defined(_IMP_EXEC_DYNAMIC_METHODDEF) */
-/*[clinic end generated code: output=5a3f012344950548 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=c1d0e65d04114958 input=a9049054013a1b77]*/