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/bytearrayobject.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/bytearrayobject.c.h')
-rw-r--r-- | Objects/clinic/bytearrayobject.c.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Objects/clinic/bytearrayobject.c.h b/Objects/clinic/bytearrayobject.c.h index f0c0af1..23c1609 100644 --- a/Objects/clinic/bytearrayobject.c.h +++ b/Objects/clinic/bytearrayobject.c.h @@ -339,18 +339,18 @@ PyDoc_STRVAR(bytearray_append__doc__, " The item to be appended."); #define BYTEARRAY_APPEND_METHODDEF \ - {"append", (PyCFunction)bytearray_append, METH_VARARGS, bytearray_append__doc__}, + {"append", (PyCFunction)bytearray_append, METH_O, bytearray_append__doc__}, static PyObject * bytearray_append_impl(PyByteArrayObject *self, int item); static PyObject * -bytearray_append(PyByteArrayObject *self, PyObject *args) +bytearray_append(PyByteArrayObject *self, PyObject *arg) { PyObject *return_value = NULL; int item; - if (!PyArg_ParseTuple(args, + if (!PyArg_Parse(arg, "O&:append", _getbytevalue, &item)) goto exit; @@ -416,18 +416,18 @@ PyDoc_STRVAR(bytearray_remove__doc__, " The value to remove."); #define BYTEARRAY_REMOVE_METHODDEF \ - {"remove", (PyCFunction)bytearray_remove, METH_VARARGS, bytearray_remove__doc__}, + {"remove", (PyCFunction)bytearray_remove, METH_O, bytearray_remove__doc__}, static PyObject * bytearray_remove_impl(PyByteArrayObject *self, int value); static PyObject * -bytearray_remove(PyByteArrayObject *self, PyObject *args) +bytearray_remove(PyByteArrayObject *self, PyObject *arg) { PyObject *return_value = NULL; int value; - if (!PyArg_ParseTuple(args, + if (!PyArg_Parse(arg, "O&:remove", _getbytevalue, &value)) goto exit; @@ -621,18 +621,18 @@ PyDoc_STRVAR(bytearray_fromhex__doc__, "Example: bytearray.fromhex(\'B9 01EF\') -> bytearray(b\'\\\\xb9\\\\x01\\\\xef\')"); #define BYTEARRAY_FROMHEX_METHODDEF \ - {"fromhex", (PyCFunction)bytearray_fromhex, METH_VARARGS|METH_CLASS, bytearray_fromhex__doc__}, + {"fromhex", (PyCFunction)bytearray_fromhex, METH_O|METH_CLASS, bytearray_fromhex__doc__}, static PyObject * bytearray_fromhex_impl(PyObject*cls, PyObject *string); static PyObject * -bytearray_fromhex(PyTypeObject *cls, PyObject *args) +bytearray_fromhex(PyTypeObject *cls, PyObject *arg) { PyObject *return_value = NULL; PyObject *string; - if (!PyArg_ParseTuple(args, + if (!PyArg_Parse(arg, "U:fromhex", &string)) goto exit; @@ -705,4 +705,4 @@ bytearray_sizeof(PyByteArrayObject *self, PyObject *Py_UNUSED(ignored)) { return bytearray_sizeof_impl(self); } -/*[clinic end generated code: output=70ea384faeca8d16 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=d763876718a66fc3 input=a9049054013a1b77]*/ |