commit | b09af03b8acc54076762e84393e446b68c861500 | [log] [tgz] |
---|---|---|
author | Martin v. Löwis <martin@v.loewis.de> | Fri Nov 04 11:16:41 2011 +0100 |
committer | Martin v. Löwis <martin@v.loewis.de> | Fri Nov 04 11:16:41 2011 +0100 |
tree | 441e94573e938e54cc2536478a80b2c9ecb64229 | |
parent | 495dcbd5c13007dfd679edc8067131228c65bccb [diff] [blame] |
Port error handlers from Py_UNICODE indexing to code point indexing.
diff --git a/Objects/exceptions.c b/Objects/exceptions.c index ad618ff..5b5447a 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c
@@ -1513,6 +1513,11 @@ return -1; } + if (PyUnicode_READY(err->object) < -1) { + err->encoding = NULL; + return -1; + } + Py_INCREF(err->encoding); Py_INCREF(err->object); Py_INCREF(err->reason);