bpo-23867: Argument Clinic: inline parsing code for a single positional parameter. (GH-9689)
diff --git a/Modules/cjkcodecs/clinic/multibytecodec.c.h b/Modules/cjkcodecs/clinic/multibytecodec.c.h
index 74e45bd..1fef185 100644
--- a/Modules/cjkcodecs/clinic/multibytecodec.c.h
+++ b/Modules/cjkcodecs/clinic/multibytecodec.c.h
@@ -150,9 +150,11 @@
PyObject *return_value = NULL;
PyLongObject *statelong;
- if (!PyArg_Parse(arg, "O!:setstate", &PyLong_Type, &statelong)) {
+ if (!PyLong_Check(arg)) {
+ _PyArg_BadArgument("setstate", "int", arg);
goto exit;
}
+ statelong = (PyLongObject *)arg;
return_value = _multibytecodec_MultibyteIncrementalEncoder_setstate_impl(self, statelong);
exit:
@@ -248,9 +250,11 @@
PyObject *return_value = NULL;
PyObject *state;
- if (!PyArg_Parse(arg, "O!:setstate", &PyTuple_Type, &state)) {
+ if (!PyTuple_Check(arg)) {
+ _PyArg_BadArgument("setstate", "tuple", arg);
goto exit;
}
+ state = arg;
return_value = _multibytecodec_MultibyteIncrementalDecoder_setstate_impl(self, state);
exit:
@@ -418,4 +422,4 @@
#define _MULTIBYTECODEC___CREATE_CODEC_METHODDEF \
{"__create_codec", (PyCFunction)_multibytecodec___create_codec, METH_O, _multibytecodec___create_codec__doc__},
-/*[clinic end generated code: output=4c1dc8015ee5abb4 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=a94364d0965adf1d input=a9049054013a1b77]*/