diff options
author | Kevin Newton <[email protected]> | 2023-11-30 20:59:00 -0500 |
---|---|---|
committer | Kevin Newton <[email protected]> | 2023-11-30 21:37:56 -0500 |
commit | e2bbbacc233b1b1c13298baff9eacfe1ef0052f4 (patch) | |
tree | c3d5f5e7f96041acc8e483479996a29e1157b4d2 /prism/util | |
parent | b4a85e402f0f4d33a3dd3eb58b6312207549d415 (diff) |
[ruby/prism] Correctly pass around const pm_encoding_t *
https://github.com/ruby/prism/commit/ce4c67fb3a
Diffstat (limited to 'prism/util')
-rw-r--r-- | prism/util/pm_memchr.c | 2 | ||||
-rw-r--r-- | prism/util/pm_memchr.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/prism/util/pm_memchr.c b/prism/util/pm_memchr.c index b2049250e4..7ea20ace6d 100644 --- a/prism/util/pm_memchr.c +++ b/prism/util/pm_memchr.c @@ -8,7 +8,7 @@ * of a multibyte character. */ void * -pm_memchr(const void *memory, int character, size_t number, bool encoding_changed, pm_encoding_t *encoding) { +pm_memchr(const void *memory, int character, size_t number, bool encoding_changed, const pm_encoding_t *encoding) { if (encoding_changed && encoding->multibyte && character >= PRISM_MEMCHR_TRAILING_BYTE_MINIMUM) { const uint8_t *source = (const uint8_t *) memory; size_t index = 0; diff --git a/prism/util/pm_memchr.h b/prism/util/pm_memchr.h index fd5879a201..e0671eaed3 100644 --- a/prism/util/pm_memchr.h +++ b/prism/util/pm_memchr.h @@ -24,6 +24,6 @@ * @return A pointer to the first occurrence of the character in the source * string, or NULL if no such character exists. */ -void * pm_memchr(const void *source, int character, size_t number, bool encoding_changed, pm_encoding_t *encoding); +void * pm_memchr(const void *source, int character, size_t number, bool encoding_changed, const pm_encoding_t *encoding); #endif |