diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2017-02-01 22:38:12 +0300 |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2017-02-01 22:38:12 +0300 |
commit | b64c0079822007c7846e7d3eb6e6f6b5d82d3a03 (patch) | |
tree | 61860585c5d1c1e62275cdc449be5d7494c143b8 /Modules/clinic/_pickle.c.h | |
parent | a706118dafc16edfed490c53db02c08aefe7b097 (diff) | |
parent | 0e4701169a3e3a022f03997399d04d28ca90c620 (diff) | |
download | cpython-b64c0079822007c7846e7d3eb6e6f6b5d82d3a03.tar.gz |
Issue #29407: Merge from 3.6
Diffstat (limited to 'Modules/clinic/_pickle.c.h')
-rw-r--r-- | Modules/clinic/_pickle.c.h | 20 |
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]*/ |