diff options
Diffstat (limited to 'include/ruby/internal/encoding')
| -rw-r--r-- | include/ruby/internal/encoding/coderange.h | 2 | ||||
| -rw-r--r-- | include/ruby/internal/encoding/string.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/ruby/internal/encoding/coderange.h b/include/ruby/internal/encoding/coderange.h index 7a81208c9e..c89f871518 100644 --- a/include/ruby/internal/encoding/coderange.h +++ b/include/ruby/internal/encoding/coderange.h @@ -79,7 +79,7 @@ RBIMPL_ATTR_CONST() static inline bool RB_ENC_CODERANGE_CLEAN_P(enum ruby_coderange_type cr) { - return rb_enc_coderange_clean_p(cr); + return rb_enc_coderange_clean_p(RBIMPL_CAST((int)cr)); } RBIMPL_ATTR_PURE_UNLESS_DEBUG() diff --git a/include/ruby/internal/encoding/string.h b/include/ruby/internal/encoding/string.h index 2b9dfe4f31..2cfa91c01e 100644 --- a/include/ruby/internal/encoding/string.h +++ b/include/ruby/internal/encoding/string.h @@ -307,13 +307,13 @@ RBIMPL_ATTR_NONNULL(()) /** * Looks for the passed string in the passed buffer. * - * @param[in] x Buffer that potentially includes `y`. + * @param[in] x Query string. * @param[in] m Number of bytes of `x`. - * @param[in] y Query string. + * @param[in] y Buffer that potentially includes `x`. * @param[in] n Number of bytes of `y`. * @param[in] enc Encoding of both `x` and `y`. * @retval -1 Not found. - * @retval otherwise Found index in `x`. + * @retval otherwise Found index in `y`. * @note This API can match at a non-character-boundary. */ long rb_memsearch(const void *x, long m, const void *y, long n, rb_encoding *enc); |
