strnlen is not used now

This commit is contained in:
NARUSE, Yui 2025-11-17 21:38:51 +09:00
parent 3bbd45dd86
commit 4fa6e9938c
2 changed files with 0 additions and 10 deletions

View File

@ -6,7 +6,6 @@ have_func("rb_enc_interned_str", "ruby/encoding.h") # RUBY_VERSION >= 3.0
have_func("rb_str_to_interned_str", "ruby.h") # RUBY_VERSION >= 3.0
have_func("rb_hash_new_capa", "ruby.h") # RUBY_VERSION >= 3.2
have_func("rb_hash_bulk_insert", "ruby.h") # Missing on TruffleRuby
have_func("strnlen", "string.h") # Missing on Solaris 10
append_cflags("-std=c99")

View File

@ -296,15 +296,6 @@ static void rvalue_stack_eagerly_release(VALUE handle)
}
}
#ifndef HAVE_STRNLEN
static size_t strnlen(const char *s, size_t maxlen)
{
char *p;
return ((p = memchr(s, '\0', maxlen)) ? p - s : maxlen);
}
#endif
static int convert_UTF32_to_UTF8(char *buf, uint32_t ch)
{
int len = 1;