summaryrefslogtreecommitdiffstats
path: root/Objects/stringlib
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-09-02 10:12:23 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-09-02 10:12:23 (GMT)
commit1a05d6c04d2a499a7485b15668f2eb37f9f60e3a (patch)
treece59d6ed99f5db6b3fc544bda74f2ba14b211d0f /Objects/stringlib
parent65a5a47d799184bf69c8f0eb6004c701ff8f7d90 (diff)
downloadcpython-1a05d6c04d2a499a7485b15668f2eb37f9f60e3a.zip
cpython-1a05d6c04d2a499a7485b15668f2eb37f9f60e3a.tar.gz
cpython-1a05d6c04d2a499a7485b15668f2eb37f9f60e3a.tar.bz2
PEP 7 style for if/else in C
Add also a newline for readability in normalize_encoding().
Diffstat (limited to 'Objects/stringlib')
-rw-r--r--Objects/stringlib/codecs.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/stringlib/codecs.h b/Objects/stringlib/codecs.h
index 749e765..a9d0a34 100644
--- a/Objects/stringlib/codecs.h
+++ b/Objects/stringlib/codecs.h
@@ -314,8 +314,9 @@ STRINGLIB(utf8_encoder)(PyObject *unicode,
else if (Py_UNICODE_IS_SURROGATE(ch)) {
Py_ssize_t startpos, endpos, newpos;
Py_ssize_t k;
- if (error_handler == _Py_ERROR_UNKNOWN)
+ if (error_handler == _Py_ERROR_UNKNOWN) {
error_handler = get_error_handler(errors);
+ }
startpos = i-1;
endpos = startpos+1;