Show More
@@ -93,7 +93,8 PyObject *unhexlify(const char *str, int | |||
|
93 | 93 | return ret; |
|
94 | 94 | } |
|
95 | 95 | |
|
96 |
static inline PyObject *_ascii |
|
|
96 | static inline PyObject *_asciitransform(PyObject *str_obj, | |
|
97 | const char table[128]) | |
|
97 | 98 | { |
|
98 | 99 | char *str, *newstr; |
|
99 | 100 | Py_ssize_t i, len; |
@@ -119,7 +120,7 static inline PyObject *_asciilower(PyOb | |||
|
119 | 120 | Py_XDECREF(err); |
|
120 | 121 | goto quit; |
|
121 | 122 | } |
|
122 |
newstr[i] = |
|
|
123 | newstr[i] = table[(unsigned char)c]; | |
|
123 | 124 | } |
|
124 | 125 | |
|
125 | 126 | ret = newobj; |
@@ -134,7 +135,7 static PyObject *asciilower(PyObject *se | |||
|
134 | 135 | PyObject *str_obj; |
|
135 | 136 | if (!PyArg_ParseTuple(args, "O!:asciilower", &PyBytes_Type, &str_obj)) |
|
136 | 137 | return NULL; |
|
137 |
return _ascii |
|
|
138 | return _asciitransform(str_obj, lowertable); | |
|
138 | 139 | } |
|
139 | 140 | |
|
140 | 141 | /* |
General Comments 0
You need to be logged in to leave comments.
Login now