@@ -1072,40 +1072,41 @@ static struct PyMethodDef xmlparse_methods[] = {
10721072*/
10731073
10741074static char template_buffer [257 ];
1075- PyObject * template_string = NULL ;
1075+ PyObject * template_string = NULL ;
10761076
10771077static void
10781078init_template_buffer (void )
10791079{
10801080 int i ;
1081- for (i = 0 ; i < 256 ;i ++ ) {
1082- template_buffer [i ]= i ;
1081+ for (i = 0 ; i < 256 ; i ++ ) {
1082+ template_buffer [i ] = i ;
10831083 }
1084- template_buffer [256 ]= 0 ;
1084+ template_buffer [256 ] = 0 ;
10851085}
10861086
10871087int
10881088PyUnknownEncodingHandler (void * encodingHandlerData ,
10891089const XML_Char * name ,
10901090XML_Encoding * info )
10911091{
1092- PyUnicodeObject * _u_string = NULL ;
1093- int result = 0 ;
1092+ PyUnicodeObject * _u_string = NULL ;
1093+ int result = 0 ;
10941094 int i ;
10951095
1096- _u_string = (PyUnicodeObject * ) PyUnicode_Decode (template_buffer , 256 , name , "replace" ); // Yes, supports only 8bit encodings
1096+ /* Yes, supports only 8bit encodings */
1097+ _u_string = (PyUnicodeObject * )
1098+ PyUnicode_Decode (template_buffer , 256 , name , "replace" );
10971099
1098- if (_u_string == NULL ) {
1100+ if (_u_string == NULL )
10991101 return result ;
1100- }
11011102
1102- for (i = 0 ; i < 256 ; i ++ ) {
1103- Py_UNICODE c = _u_string -> str [i ] ; // Stupid to access directly, but fast
1104- if (c == Py_UNICODE_REPLACEMENT_CHARACTER ) {
1103+ for (i = 0 ; i < 256 ; i ++ ) {
1104+ /* Stupid to access directly, but fast */
1105+ Py_UNICODE c = _u_string -> str [i ];
1106+ if (c == Py_UNICODE_REPLACEMENT_CHARACTER )
11051107 info -> map [i ] = -1 ;
1106- } else {
1108+ else
11071109 info -> map [i ] = c ;
1108- }
11091110 }
11101111
11111112 info -> data = NULL ;
0 commit comments