Issue #23492: Argument Clinic now generates argument parsing code with

PyArg_Parse instead of PyArg_ParseTuple if possible.
This commit is contained in:
Serhiy Storchaka 2015-04-04 00:12:11 +03:00
parent 1009bf18b3
commit 92e8af67a8
17 changed files with 320 additions and 302 deletions

View file

@ -9,18 +9,18 @@ PyDoc_STRVAR(_codecs__forget_codec__doc__,
"Purge the named codec from the internal codec lookup cache");
#define _CODECS__FORGET_CODEC_METHODDEF \
{"_forget_codec", (PyCFunction)_codecs__forget_codec, METH_VARARGS, _codecs__forget_codec__doc__},
{"_forget_codec", (PyCFunction)_codecs__forget_codec, METH_O, _codecs__forget_codec__doc__},
static PyObject *
_codecs__forget_codec_impl(PyModuleDef *module, const char *encoding);
static PyObject *
_codecs__forget_codec(PyModuleDef *module, PyObject *args)
_codecs__forget_codec(PyModuleDef *module, PyObject *arg)
{
PyObject *return_value = NULL;
const char *encoding;
if (!PyArg_ParseTuple(args,
if (!PyArg_Parse(arg,
"s:_forget_codec",
&encoding))
goto exit;
@ -29,4 +29,4 @@ _codecs__forget_codec(PyModuleDef *module, PyObject *args)
exit:
return return_value;
}
/*[clinic end generated code: output=cdea83e21d76a900 input=a9049054013a1b77]*/
/*[clinic end generated code: output=fc5ce4d3166f7d96 input=a9049054013a1b77]*/