diff options
| author | Eric V. Smith <eric@trueblade.com> | 2016-10-31 09:22:08 -0400 |
|---|---|---|
| committer | Eric V. Smith <eric@trueblade.com> | 2016-10-31 09:22:08 -0400 |
| commit | 42454af094fd572a97a6302e8c1226be68c0efa9 (patch) | |
| tree | 29a7b5737fe214a0571af7c6daf53a4d85c6bae4 /Include/bytesobject.h | |
| parent | a99cdb21a7d67ce5d1e3cc93b08eb3b6eecba60b (diff) | |
| download | cpython-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.h | 5 |
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 |
