Mercurial > hgrepos > Python > libs > ConfigMix
changeset 564:44e18fbf7741
Refactor: signature of _convert_ucs4_to_utf8(): change order of args
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Thu, 06 Jan 2022 22:36:37 +0100 |
| parents | 2c211934d4b0 |
| children | 5c617d870bb8 |
| files | configmix/_speedups.c |
| diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/configmix/_speedups.c Thu Jan 06 20:37:29 2022 +0100 +++ b/configmix/_speedups.c Thu Jan 06 22:36:37 2022 +0100 @@ -145,10 +145,11 @@ Py_ssize_t _convert_ucs4_to_utf8( Py_UCS4 ch, + unsigned char *targetStart, unsigned char *targetEnd, + int strict, PyObject *ch_obj, /* for error messages: the string where ch comes from */ - Py_ssize_t ch_obj_end, /* effective length of ch_obj (error reporting) */ - unsigned char *targetStart, unsigned char *targetEnd, - int strict) + Py_ssize_t ch_obj_end /* effective length of ch_obj (error reporting) */ + ) { const Py_UCS4 byteMask = 0xBF; const Py_UCS4 byteMark = 0x80; @@ -222,7 +223,7 @@ return NULL; /* Replace the combination PyUniode_New/PyUnicode_WriteChar */ - bytes_written = _convert_ucs4_to_utf8(c, s, end+1, buf, &(buf[6]), 1); + bytes_written = _convert_ucs4_to_utf8(c, buf, &(buf[6]), 1, s, end+1); if (bytes_written < 0) { return NULL; }
