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:
Antoine Pitrou 2012-01-29 18:43:36 +01:00
commit 7ab4af0427
6 changed files with 41 additions and 21 deletions

View file

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