Skip to content

Commit dfafd3f

Browse files
authored
Merge pull request #4058 from Earlopain/silence-discarded-qualifiers
2 parents 7534097 + a3b1f10 commit dfafd3f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/prism/internal/memchr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
* we need to search for a character in a buffer that could be the trailing byte
1111
* of a multibyte character.
1212
*/
13-
void * pm_memchr(const void *source, int character, size_t number, bool encoding_changed, const pm_encoding_t *encoding);
13+
const void * pm_memchr(const void *source, int character, size_t number, bool encoding_changed, const pm_encoding_t *encoding);
1414

1515
#endif

src/memchr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* we need to search for a character in a buffer that could be the trailing byte
1212
* of a multibyte character.
1313
*/
14-
void *
14+
const void *
1515
pm_memchr(const void *memory, int character, size_t number, bool encoding_changed, const pm_encoding_t *encoding) {
1616
if (encoding_changed && encoding->multibyte && character >= TRAILING_BYTE_MINIMUM) {
1717
const uint8_t *source = (const uint8_t *) memory;

0 commit comments

Comments
 (0)