##// END OF EJS Templates
charencode: allow clang-format oversight...
Augie Fackler -
r36243:6c87d411 default
parent child Browse files
Show More
@@ -1,8 +1,6 b''
1 # Files that just need to be migrated to the formatter.
1 # Files that just need to be migrated to the formatter.
2 # Do not add new files here!
2 # Do not add new files here!
3 mercurial/cext/base85.c
3 mercurial/cext/base85.c
4 mercurial/cext/charencode.c
5 mercurial/cext/charencode.h
6 mercurial/cext/dirs.c
4 mercurial/cext/dirs.c
7 mercurial/cext/manifest.c
5 mercurial/cext/manifest.c
8 mercurial/cext/mpatch.c
6 mercurial/cext/mpatch.c
@@ -151,9 +151,8 b' PyObject *isasciistr(PyObject *self, PyO'
151 Py_RETURN_TRUE;
151 Py_RETURN_TRUE;
152 }
152 }
153
153
154 static inline PyObject *_asciitransform(PyObject *str_obj,
154 static inline PyObject *
155 const char table[128],
155 _asciitransform(PyObject *str_obj, const char table[128], PyObject *fallback_fn)
156 PyObject *fallback_fn)
157 {
156 {
158 char *str, *newstr;
157 char *str, *newstr;
159 Py_ssize_t i, len;
158 Py_ssize_t i, len;
@@ -173,8 +172,8 b' static inline PyObject *_asciitransform('
173 char c = str[i];
172 char c = str[i];
174 if (c & 0x80) {
173 if (c & 0x80) {
175 if (fallback_fn != NULL) {
174 if (fallback_fn != NULL) {
176 ret = PyObject_CallFunctionObjArgs(fallback_fn,
175 ret = PyObject_CallFunctionObjArgs(
177 str_obj, NULL);
176 fallback_fn, str_obj, NULL);
178 } else {
177 } else {
179 PyObject *err = PyUnicodeDecodeError_Create(
178 PyObject *err = PyUnicodeDecodeError_Create(
180 "ascii", str, len, i, (i + 1),
179 "ascii", str, len, i, (i + 1),
@@ -220,10 +219,9 b' PyObject *make_file_foldmap(PyObject *se'
220 Py_ssize_t pos = 0;
219 Py_ssize_t pos = 0;
221 const char *table;
220 const char *table;
222
221
223 if (!PyArg_ParseTuple(args, "O!O!O!:make_file_foldmap",
222 if (!PyArg_ParseTuple(args, "O!O!O!:make_file_foldmap", &PyDict_Type,
224 &PyDict_Type, &dmap,
223 &dmap, &PyInt_Type, &spec_obj, &PyFunction_Type,
225 &PyInt_Type, &spec_obj,
224 &normcase_fallback))
226 &PyFunction_Type, &normcase_fallback))
227 goto quit;
225 goto quit;
228
226
229 spec = (int)PyInt_AS_LONG(spec_obj);
227 spec = (int)PyInt_AS_LONG(spec_obj);
@@ -377,8 +375,8 b' PyObject *jsonescapeu8fast(PyObject *sel'
377 const char *origbuf;
375 const char *origbuf;
378 Py_ssize_t origlen, esclen;
376 Py_ssize_t origlen, esclen;
379 int paranoid;
377 int paranoid;
380 if (!PyArg_ParseTuple(args, "O!i:jsonescapeu8fast",
378 if (!PyArg_ParseTuple(args, "O!i:jsonescapeu8fast", &PyBytes_Type,
381 &PyBytes_Type, &origstr, &paranoid))
379 &origstr, &paranoid))
382 return NULL;
380 return NULL;
383
381
384 origbuf = PyBytes_AS_STRING(origstr);
382 origbuf = PyBytes_AS_STRING(origstr);
General Comments 0
You need to be logged in to leave comments. Login now