[utils] changing signature of utf8proc_iterate_reversed so it takes the same arguments as utf8proc_iterate for function pointer purposes

This commit is contained in:
Al
2015-05-25 15:35:28 -04:00
parent 26ff3292d2
commit 8ac8f83b7f
2 changed files with 4 additions and 4 deletions

View File

@@ -95,15 +95,15 @@ uint string_translate(char *str, size_t len, char *word_chars, char *word_repls,
return num_replacements;
}
ssize_t utf8proc_iterate_reversed(const uint8_t *str, const uint8_t *start, int32_t *dst) {
ssize_t utf8proc_iterate_reversed(const uint8_t *str, ssize_t start, int32_t *dst) {
ssize_t len = 0;
const uint8_t *ptr = str;
const uint8_t *ptr = str + start;
*dst = -1;
do {
if (ptr <= start) return 0;
if (ptr <= str) return 0;
ptr--; len++;
} while ((*ptr & 0xC0) == 0x80);