summaryrefslogtreecommitdiff
path: root/Include/bytesobject.h
diff options
context:
space:
mode:
authorEric V. Smith <eric@trueblade.com>2016-10-31 09:22:08 -0400
committerEric V. Smith <eric@trueblade.com>2016-10-31 09:22:08 -0400
commit42454af094fd572a97a6302e8c1226be68c0efa9 (patch)
tree29a7b5737fe214a0571af7c6daf53a4d85c6bae4 /Include/bytesobject.h
parenta99cdb21a7d67ce5d1e3cc93b08eb3b6eecba60b (diff)
downloadcpython-git-42454af094fd572a97a6302e8c1226be68c0efa9.tar.gz
Issue 28128: Print out better error/warning messages for invalid string escapes.
Diffstat (limited to 'Include/bytesobject.h')
-rw-r--r--Include/bytesobject.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Include/bytesobject.h b/Include/bytesobject.h
index 11d8218402..98e29b6879 100644
--- a/Include/bytesobject.h
+++ b/Include/bytesobject.h
@@ -74,6 +74,11 @@ PyAPI_FUNC(PyObject*) _PyBytes_FromHex(
PyAPI_FUNC(PyObject *) PyBytes_DecodeEscape(const char *, Py_ssize_t,
const char *, Py_ssize_t,
const char *);
+/* Helper for PyBytes_DecodeEscape that detects invalid escape chars. */
+PyAPI_FUNC(PyObject *) _PyBytes_DecodeEscape(const char *, Py_ssize_t,
+ const char *, Py_ssize_t,
+ const char *,
+ const char **);
/* Macro, trading safety for speed */
#ifndef Py_LIMITED_API