mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #13848: open() and the FileIO constructor now check for NUL characters in the file name.
Patch by Hynek Schlawack.
This commit is contained in:
commit
7ab4af0427
6 changed files with 41 additions and 21 deletions
|
@ -1914,6 +1914,12 @@ PyAPI_FUNC(int) PyUnicode_Contains(
|
|||
PyObject *element /* Element string */
|
||||
);
|
||||
|
||||
/* Checks whether the string contains any NUL characters. */
|
||||
|
||||
#ifndef Py_LIMITED_API
|
||||
PyAPI_FUNC(int) _PyUnicode_HasNULChars(PyObject *);
|
||||
#endif
|
||||
|
||||
/* Checks whether argument is a valid identifier. */
|
||||
|
||||
PyAPI_FUNC(int) PyUnicode_IsIdentifier(PyObject *s);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue