restore *data* parameter of binascii.b2a_base64 to positional-only (#1352)

This commit is contained in:
Xiang Zhang 2017-05-01 13:12:07 +08:00 committed by GitHub
parent 2e624690bd
commit 1374dbb694
2 changed files with 5 additions and 4 deletions

View File

@ -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;

View File

@ -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]*/