diff options
author | Fred Drake <fdrake@acm.org> | 2001-03-01 20:48:17 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-03-01 20:48:17 (GMT) |
commit | bb66a200becd14918dbece406c2b0fd63c15f28a (patch) | |
tree | 5c1b96bb53da3375cfc159d0b10a13ab2f70db93 /Modules | |
parent | 4a2261aee51e753d2d2e4b7904b99b17449d0587 (diff) | |
download | cpython-bb66a200becd14918dbece406c2b0fd63c15f28a.zip cpython-bb66a200becd14918dbece406c2b0fd63c15f28a.tar.gz cpython-bb66a200becd14918dbece406c2b0fd63c15f28a.tar.bz2 |
Wrap some long lines, use only C89 /* */ comments, and add spaces around
some operators (style guide conformance).
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/pyexpat.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c index 39caab9..4d7008d 100644 --- a/Modules/pyexpat.c +++ b/Modules/pyexpat.c @@ -1072,16 +1072,16 @@ static struct PyMethodDef xmlparse_methods[] = { */ static char template_buffer[257]; -PyObject * template_string=NULL; +PyObject *template_string = NULL; static void init_template_buffer(void) { int i; - for (i=0;i<256;i++) { - template_buffer[i]=i; + for (i = 0; i < 256; i++) { + template_buffer[i] = i; } - template_buffer[256]=0; + template_buffer[256] = 0; } int @@ -1089,23 +1089,24 @@ PyUnknownEncodingHandler(void *encodingHandlerData, const XML_Char *name, XML_Encoding * info) { - PyUnicodeObject * _u_string=NULL; - int result=0; + PyUnicodeObject *_u_string = NULL; + int result = 0; int i; - _u_string=(PyUnicodeObject *) PyUnicode_Decode(template_buffer, 256, name, "replace"); // Yes, supports only 8bit encodings + /* Yes, supports only 8bit encodings */ + _u_string = (PyUnicodeObject *) + PyUnicode_Decode(template_buffer, 256, name, "replace"); - if (_u_string==NULL) { + if (_u_string == NULL) return result; - } - for (i=0; i<256; i++) { - Py_UNICODE c = _u_string->str[i] ; // Stupid to access directly, but fast - if (c==Py_UNICODE_REPLACEMENT_CHARACTER) { + for (i = 0; i < 256; i++) { + /* Stupid to access directly, but fast */ + Py_UNICODE c = _u_string->str[i]; + if (c == Py_UNICODE_REPLACEMENT_CHARACTER) info->map[i] = -1; - } else { + else info->map[i] = c; - } } info->data = NULL; |