diff options
author | Charles-François Natali <cf.natali@gmail.com> | 2014-06-19 21:45:09 (GMT) |
---|---|---|
committer | Charles-François Natali <cf.natali@gmail.com> | 2014-06-19 21:45:09 (GMT) |
commit | e4cda6ce21dc268e308f0ee95e097f667f680d43 (patch) | |
tree | 083b7fbe6e01e752a0c367729b513e9dcc5c9bfd /Objects/unicodeobject.c | |
parent | cee4f034385902659ec1ade666e17537eb2bc399 (diff) | |
parent | 077c9564b7f0c09352d1d918f38d2cb75fe61881 (diff) | |
download | cpython-e4cda6ce21dc268e308f0ee95e097f667f680d43.zip cpython-e4cda6ce21dc268e308f0ee95e097f667f680d43.tar.gz cpython-e4cda6ce21dc268e308f0ee95e097f667f680d43.tar.bz2 |
Merge.
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r-- | Objects/unicodeobject.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 5ce9c88..29f9bce 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -3520,8 +3520,7 @@ static void make_encode_exception(PyObject **exceptionObject, goto onError; return; onError: - Py_DECREF(*exceptionObject); - *exceptionObject = NULL; + Py_CLEAR(*exceptionObject); } } @@ -4826,8 +4825,7 @@ static void make_translate_exception(PyObject **exceptionObject, goto onError; return; onError: - Py_DECREF(*exceptionObject); - *exceptionObject = NULL; + Py_CLEAR(*exceptionObject); } } @@ -5620,7 +5618,7 @@ PyUnicode_Join(PyObject *separator, PyObject *seq) PyObject *item; Py_ssize_t i; - fseq = PySequence_Fast(seq, ""); + fseq = PySequence_Fast(seq, "can only join an iterable"); if (fseq == NULL) { return NULL; } |