Kaydet (Commit) e7c6ee4b authored tarafından Marc-André Lemburg's avatar Marc-André Lemburg

Whitespace fixes.

üst 3688a882
...@@ -1203,9 +1203,9 @@ PyObject *PyUnicode_EncodeUTF8(const Py_UNICODE *s, ...@@ -1203,9 +1203,9 @@ PyObject *PyUnicode_EncodeUTF8(const Py_UNICODE *s,
if (cbWritten >= cbAllocated) { if (cbWritten >= cbAllocated) {
cbAllocated += 4 * 10; cbAllocated += 4 * 10;
if (_PyString_Resize(&v, cbAllocated + 4)) if (_PyString_Resize(&v, cbAllocated + 4))
goto onError; goto onError;
p = PyString_AS_STRING(v) + cbWritten; p = PyString_AS_STRING(v) + cbWritten;
} }
if (ch < 0x10000) { if (ch < 0x10000) {
/* Check for high surrogate */ /* Check for high surrogate */
...@@ -1225,19 +1225,19 @@ PyObject *PyUnicode_EncodeUTF8(const Py_UNICODE *s, ...@@ -1225,19 +1225,19 @@ PyObject *PyUnicode_EncodeUTF8(const Py_UNICODE *s,
/* Fall through: handles isolated high surrogates */ /* Fall through: handles isolated high surrogates */
} }
*p++ = (char)(0xe0 | (ch >> 12)); *p++ = (char)(0xe0 | (ch >> 12));
*p++ = (char)(0x80 | ((ch >> 6) & 0x3f)); *p++ = (char)(0x80 | ((ch >> 6) & 0x3f));
*p++ = (char)(0x80 | (ch & 0x3f)); *p++ = (char)(0x80 | (ch & 0x3f));
cbWritten += 3; cbWritten += 3;
} else { } else {
*p++ = 0xf0 | (ch>>18); *p++ = 0xf0 | (ch>>18);
*p++ = 0x80 | ((ch>>12) & 0x3f); *p++ = 0x80 | ((ch>>12) & 0x3f);
*p++ = 0x80 | ((ch>>6) & 0x3f); *p++ = 0x80 | ((ch>>6) & 0x3f);
*p++ = 0x80 | (ch & 0x3f); *p++ = 0x80 | (ch & 0x3f);
cbWritten += 4; cbWritten += 4;
}
} }
} }
}
*p = '\0'; *p = '\0';
if (_PyString_Resize(&v, cbWritten)) if (_PyString_Resize(&v, cbWritten))
goto onError; goto onError;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment