mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Use the t# format where appropriate. Greg Stein.
This commit is contained in:
parent
b317f8aa0d
commit
7e48898d86
9 changed files with 34 additions and 37 deletions
|
|
@ -213,7 +213,7 @@ binascii_a2b_uu(self, args)
|
|||
PyObject *rv;
|
||||
int ascii_len, bin_len;
|
||||
|
||||
if ( !PyArg_ParseTuple(args, "s#", &ascii_data, &ascii_len) )
|
||||
if ( !PyArg_ParseTuple(args, "t#", &ascii_data, &ascii_len) )
|
||||
return NULL;
|
||||
|
||||
/* First byte: binary data length (in bytes) */
|
||||
|
|
@ -343,7 +343,7 @@ binascii_a2b_base64(self, args)
|
|||
PyObject *rv;
|
||||
int ascii_len, bin_len;
|
||||
|
||||
if ( !PyArg_ParseTuple(args, "s#", &ascii_data, &ascii_len) )
|
||||
if ( !PyArg_ParseTuple(args, "t#", &ascii_data, &ascii_len) )
|
||||
return NULL;
|
||||
|
||||
bin_len = ((ascii_len+3)/4)*3; /* Upper bound, corrected later */
|
||||
|
|
@ -457,7 +457,7 @@ binascii_a2b_hqx(self, args)
|
|||
int len;
|
||||
int done = 0;
|
||||
|
||||
if ( !PyArg_ParseTuple(args, "s#", &ascii_data, &len) )
|
||||
if ( !PyArg_ParseTuple(args, "t#", &ascii_data, &len) )
|
||||
return NULL;
|
||||
|
||||
/* Allocate a string that is too big (fixed later) */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue