summaryrefslogtreecommitdiff
path: root/Include
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-01-29 18:36:34 +0100
committerAntoine Pitrou <solipsis@pitrou.net>2012-01-29 18:36:34 +0100
commitd7fbc18de7634910a3c5472cda5a17f49d0aa472 (patch)
tree87753789fbf5a288990d3229999705e4ea4703ce /Include
parent424ec25c272561972cfc0eb78704cf745c5c870f (diff)
downloadcpython-d7fbc18de7634910a3c5472cda5a17f49d0aa472.tar.gz
Issue #13848: open() and the FileIO constructor now check for NUL characters in the file name.
Patch by Hynek Schlawack.
Diffstat (limited to 'Include')
-rw-r--r--Include/unicodeobject.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h
index 477f526637..379a90c6c2 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);