mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +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
|
@ -612,7 +612,7 @@ posix_listdir(self, args)
|
|||
WIN32_FIND_DATA FileData;
|
||||
char namebuf[MAX_PATH+5];
|
||||
|
||||
if (!PyArg_Parse(args, "s#", &name, &len))
|
||||
if (!PyArg_Parse(args, "t#", &name, &len))
|
||||
return NULL;
|
||||
if (len >= MAX_PATH) {
|
||||
PyErr_SetString(PyExc_ValueError, "path too long");
|
||||
|
@ -673,7 +673,7 @@ posix_listdir(self, args)
|
|||
char namebuf[MAX_PATH+5];
|
||||
struct _find_t ep;
|
||||
|
||||
if (!PyArg_Parse(args, "s#", &name, &len))
|
||||
if (!PyArg_Parse(args, "t#", &name, &len))
|
||||
return NULL;
|
||||
if (len >= MAX_PATH) {
|
||||
PyErr_SetString(PyExc_ValueError, "path too long");
|
||||
|
@ -738,7 +738,7 @@ posix_listdir(self, args)
|
|||
FILEFINDBUF3 ep;
|
||||
APIRET rc;
|
||||
|
||||
if (!PyArg_Parse(args, "s#", &name, &len))
|
||||
if (!PyArg_Parse(args, "t#", &name, &len))
|
||||
return NULL;
|
||||
if (len >= MAX_PATH) {
|
||||
PyErr_SetString(PyExc_ValueError, "path too long");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue