From 1374dbb6940f29c49c2966551a06015857c942cc Mon Sep 17 00:00:00 2001 From: Xiang Zhang Date: Mon, 1 May 2017 13:12:07 +0800 Subject: restore *data* parameter of binascii.b2a_base64 to positional-only (#1352) --- Modules/binascii.c | 3 ++- Modules/clinic/binascii.c.h | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Modules/binascii.c b/Modules/binascii.c index bf6ce86..fbd2320 100644 --- a/Modules/binascii.c +++ b/Modules/binascii.c @@ -515,6 +515,7 @@ binascii_a2b_base64_impl(PyObject *module, Py_buffer *data) binascii.b2a_base64 data: Py_buffer + / * newline: bool(accept={int}) = True @@ -523,7 +524,7 @@ Base64-code line of data. static PyObject * binascii_b2a_base64_impl(PyObject *module, Py_buffer *data, int newline) -/*[clinic end generated code: output=4ad62c8e8485d3b3 input=144fd7267a34d51c]*/ +/*[clinic end generated code: output=4ad62c8e8485d3b3 input=6083dac5777fa45d]*/ { unsigned char *ascii_data; const unsigned char *bin_data; diff --git a/Modules/clinic/binascii.c.h b/Modules/clinic/binascii.c.h index 093d32b..ca5d4c5 100644 --- a/Modules/clinic/binascii.c.h +++ b/Modules/clinic/binascii.c.h @@ -97,7 +97,7 @@ exit: } PyDoc_STRVAR(binascii_b2a_base64__doc__, -"b2a_base64($module, /, data, *, newline=True)\n" +"b2a_base64($module, data, /, *, newline=True)\n" "--\n" "\n" "Base64-code line of data."); @@ -112,7 +112,7 @@ static PyObject * binascii_b2a_base64(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - static const char * const _keywords[] = {"data", "newline", NULL}; + static const char * const _keywords[] = {"", "newline", NULL}; static _PyArg_Parser _parser = {"y*|$i:b2a_base64", _keywords, 0}; Py_buffer data = {NULL, NULL}; int newline = 1; @@ -558,4 +558,4 @@ exit: return return_value; } -/*[clinic end generated code: output=4a418f883ccc79fe input=a9049054013a1b77]*/ +/*[clinic end generated code: output=35821bce7e0e4714 input=a9049054013a1b77]*/ -- cgit v0.12