summaryrefslogtreecommitdiffstats
path: root/Include/unicodeobject.h
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-01-29 17:36:34 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-01-29 17:36:34 (GMT)
commit1334884ff2f5a3968e6a26157f869b4ca5de189b (patch)
tree6cd82b8fa2964ad30b617cac8d0eaf98890d82c0 /Include/unicodeobject.h
parentc875d2032bf363da5e9e50928330f5ee2aa2fda2 (diff)
downloadcpython-1334884ff2f5a3968e6a26157f869b4ca5de189b.zip
cpython-1334884ff2f5a3968e6a26157f869b4ca5de189b.tar.gz
cpython-1334884ff2f5a3968e6a26157f869b4ca5de189b.tar.bz2
Issue #13848: open() and the FileIO constructor now check for NUL characters in the file name.
Patch by Hynek Schlawack.
Diffstat (limited to 'Include/unicodeobject.h')
-rw-r--r--Include/unicodeobject.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h
index 477f526..379a90c 100644
--- a/Include/unicodeobject.h
+++ b/Include/unicodeobject.h
@@ -1501,6 +1501,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);