mirror of
https://github.com/python/cpython.git
synced 2025-10-06 15:11:58 +00:00
bpo-24037: Add Argument Clinic converter bool(accept={int})
. (#485)
This commit is contained in:
parent
0767ad40bf
commit
202fda55c2
17 changed files with 81 additions and 73 deletions
|
@ -516,14 +516,14 @@ binascii.b2a_base64
|
|||
|
||||
data: Py_buffer
|
||||
*
|
||||
newline: int(c_default="1") = True
|
||||
newline: bool(accept={int}) = True
|
||||
|
||||
Base64-code line of data.
|
||||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
binascii_b2a_base64_impl(PyObject *module, Py_buffer *data, int newline)
|
||||
/*[clinic end generated code: output=4ad62c8e8485d3b3 input=7b2ea6fa38d8924c]*/
|
||||
/*[clinic end generated code: output=4ad62c8e8485d3b3 input=144fd7267a34d51c]*/
|
||||
{
|
||||
unsigned char *ascii_data;
|
||||
const unsigned char *bin_data;
|
||||
|
@ -1229,14 +1229,14 @@ static const int table_hex[128] = {
|
|||
binascii.a2b_qp
|
||||
|
||||
data: ascii_buffer
|
||||
header: int(c_default="0") = False
|
||||
header: bool(accept={int}) = False
|
||||
|
||||
Decode a string of qp-encoded data.
|
||||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
binascii_a2b_qp_impl(PyObject *module, Py_buffer *data, int header)
|
||||
/*[clinic end generated code: output=e99f7846cfb9bc53 input=5187a0d3d8e54f3b]*/
|
||||
/*[clinic end generated code: output=e99f7846cfb9bc53 input=bf6766fea76cce8f]*/
|
||||
{
|
||||
Py_ssize_t in, out;
|
||||
char ch;
|
||||
|
@ -1331,9 +1331,9 @@ to_hex (unsigned char ch, unsigned char *s)
|
|||
binascii.b2a_qp
|
||||
|
||||
data: Py_buffer
|
||||
quotetabs: int(c_default="0") = False
|
||||
istext: int(c_default="1") = True
|
||||
header: int(c_default="0") = False
|
||||
quotetabs: bool(accept={int}) = False
|
||||
istext: bool(accept={int}) = True
|
||||
header: bool(accept={int}) = False
|
||||
|
||||
Encode a string using quoted-printable encoding.
|
||||
|
||||
|
@ -1345,7 +1345,7 @@ are both encoded. When quotetabs is set, space and tabs are encoded.
|
|||
static PyObject *
|
||||
binascii_b2a_qp_impl(PyObject *module, Py_buffer *data, int quotetabs,
|
||||
int istext, int header)
|
||||
/*[clinic end generated code: output=e9884472ebb1a94c input=7f2a9aaa008e92b2]*/
|
||||
/*[clinic end generated code: output=e9884472ebb1a94c input=21fb7eea4a184ba6]*/
|
||||
{
|
||||
Py_ssize_t in, out;
|
||||
const unsigned char *databuf;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue