diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-04-03 21:12:11 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-04-03 21:12:11 (GMT) |
commit | 92e8af67a89b204efedad3373c292c0b3c52072c (patch) | |
tree | 0e319cfdf2015aedc0e932c2a30ad71734aa0824 /Objects/clinic/bytesobject.c.h | |
parent | 1009bf18b38a8d36298575191dd8fdf43f8f9097 (diff) | |
download | cpython-92e8af67a89b204efedad3373c292c0b3c52072c.zip cpython-92e8af67a89b204efedad3373c292c0b3c52072c.tar.gz cpython-92e8af67a89b204efedad3373c292c0b3c52072c.tar.bz2 |
Issue #23492: Argument Clinic now generates argument parsing code with
PyArg_Parse instead of PyArg_ParseTuple if possible.
Diffstat (limited to 'Objects/clinic/bytesobject.c.h')
-rw-r--r-- | Objects/clinic/bytesobject.c.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Objects/clinic/bytesobject.c.h b/Objects/clinic/bytesobject.c.h index 642a08c..5f0ae05 100644 --- a/Objects/clinic/bytesobject.c.h +++ b/Objects/clinic/bytesobject.c.h @@ -54,18 +54,18 @@ PyDoc_STRVAR(bytes_partition__doc__, "object and two empty bytes objects."); #define BYTES_PARTITION_METHODDEF \ - {"partition", (PyCFunction)bytes_partition, METH_VARARGS, bytes_partition__doc__}, + {"partition", (PyCFunction)bytes_partition, METH_O, bytes_partition__doc__}, static PyObject * bytes_partition_impl(PyBytesObject *self, Py_buffer *sep); static PyObject * -bytes_partition(PyBytesObject *self, PyObject *args) +bytes_partition(PyBytesObject *self, PyObject *arg) { PyObject *return_value = NULL; Py_buffer sep = {NULL, NULL}; - if (!PyArg_ParseTuple(args, + if (!PyArg_Parse(arg, "y*:partition", &sep)) goto exit; @@ -93,18 +93,18 @@ PyDoc_STRVAR(bytes_rpartition__doc__, "objects and the original bytes object."); #define BYTES_RPARTITION_METHODDEF \ - {"rpartition", (PyCFunction)bytes_rpartition, METH_VARARGS, bytes_rpartition__doc__}, + {"rpartition", (PyCFunction)bytes_rpartition, METH_O, bytes_rpartition__doc__}, static PyObject * bytes_rpartition_impl(PyBytesObject *self, Py_buffer *sep); static PyObject * -bytes_rpartition(PyBytesObject *self, PyObject *args) +bytes_rpartition(PyBytesObject *self, PyObject *arg) { PyObject *return_value = NULL; Py_buffer sep = {NULL, NULL}; - if (!PyArg_ParseTuple(args, + if (!PyArg_Parse(arg, "y*:rpartition", &sep)) goto exit; @@ -473,18 +473,18 @@ PyDoc_STRVAR(bytes_fromhex__doc__, "Example: bytes.fromhex(\'B9 01EF\') -> b\'\\\\xb9\\\\x01\\\\xef\'."); #define BYTES_FROMHEX_METHODDEF \ - {"fromhex", (PyCFunction)bytes_fromhex, METH_VARARGS|METH_CLASS, bytes_fromhex__doc__}, + {"fromhex", (PyCFunction)bytes_fromhex, METH_O|METH_CLASS, bytes_fromhex__doc__}, static PyObject * bytes_fromhex_impl(PyTypeObject *type, PyObject *string); static PyObject * -bytes_fromhex(PyTypeObject *type, PyObject *args) +bytes_fromhex(PyTypeObject *type, PyObject *arg) { PyObject *return_value = NULL; PyObject *string; - if (!PyArg_ParseTuple(args, + if (!PyArg_Parse(arg, "U:fromhex", &string)) goto exit; @@ -493,4 +493,4 @@ bytes_fromhex(PyTypeObject *type, PyObject *args) exit: return return_value; } -/*[clinic end generated code: output=dfe5c9a317b99f49 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b9e69e1f7c8ccd14 input=a9049054013a1b77]*/ |