Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/prism/internal/memchr.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
* we need to search for a character in a buffer that could be the trailing byte
* of a multibyte character.
*/
void * pm_memchr(const void *source, int character, size_t number, bool encoding_changed, const pm_encoding_t *encoding);
const void * pm_memchr(const void *source, int character, size_t number, bool encoding_changed, const pm_encoding_t *encoding);

#endif
2 changes: 1 addition & 1 deletion src/memchr.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* we need to search for a character in a buffer that could be the trailing byte
* of a multibyte character.
*/
void *
const void *
pm_memchr(const void *memory, int character, size_t number, bool encoding_changed, const pm_encoding_t *encoding) {
if (encoding_changed && encoding->multibyte && character >= TRAILING_BYTE_MINIMUM) {
const uint8_t *source = (const uint8_t *) memory;
Expand Down