summaryrefslogtreecommitdiff
path: root/Modules/clinic/_pickle.c.h
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/clinic/_pickle.c.h')
-rw-r--r--Modules/clinic/_pickle.c.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/Modules/clinic/_pickle.c.h b/Modules/clinic/_pickle.c.h
index 9ad4c37f47..e10730a6de 100644
--- a/Modules/clinic/_pickle.c.h
+++ b/Modules/clinic/_pickle.c.h
@@ -199,7 +199,7 @@ PyDoc_STRVAR(_pickle_Unpickler_find_class__doc__,
"needed. Both arguments passed are str objects.");
#define _PICKLE_UNPICKLER_FIND_CLASS_METHODDEF \
- {"find_class", (PyCFunction)_pickle_Unpickler_find_class, METH_VARARGS, _pickle_Unpickler_find_class__doc__},
+ {"find_class", (PyCFunction)_pickle_Unpickler_find_class, METH_FASTCALL, _pickle_Unpickler_find_class__doc__},
static PyObject *
_pickle_Unpickler_find_class_impl(UnpicklerObject *self,
@@ -207,17 +207,21 @@ _pickle_Unpickler_find_class_impl(UnpicklerObject *self,
PyObject *global_name);
static PyObject *
-_pickle_Unpickler_find_class(UnpicklerObject *self, PyObject *args)
+_pickle_Unpickler_find_class(UnpicklerObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
PyObject *module_name;
PyObject *global_name;
- if (!PyArg_UnpackTuple(args, "find_class",
+ if (!_PyArg_UnpackStack(args, nargs, "find_class",
2, 2,
&module_name, &global_name)) {
goto exit;
}
+
+ if (!_PyArg_NoStackKeywords("find_class", kwnames)) {
+ goto exit;
+ }
return_value = _pickle_Unpickler_find_class_impl(self, module_name, global_name);
exit:
@@ -401,7 +405,7 @@ _pickle_dump(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwna
PyObject *protocol = NULL;
int fix_imports = 1;
- if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
+ if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser,
&obj, &file, &protocol, &fix_imports)) {
goto exit;
}
@@ -446,7 +450,7 @@ _pickle_dumps(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwn
PyObject *protocol = NULL;
int fix_imports = 1;
- if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
+ if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser,
&obj, &protocol, &fix_imports)) {
goto exit;
}
@@ -503,7 +507,7 @@ _pickle_load(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwna
const char *encoding = "ASCII";
const char *errors = "strict";
- if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
+ if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser,
&file, &fix_imports, &encoding, &errors)) {
goto exit;
}
@@ -551,7 +555,7 @@ _pickle_loads(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwn
const char *encoding = "ASCII";
const char *errors = "strict";
- if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
+ if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser,
&data, &fix_imports, &encoding, &errors)) {
goto exit;
}
@@ -560,4 +564,4 @@ _pickle_loads(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwn
exit:
return return_value;
}
-/*[clinic end generated code: output=82be137b3c09cb9f input=a9049054013a1b77]*/
+/*[clinic end generated code: output=b921d325b2f7a096 input=a9049054013a1b77]*/