mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 04:24:23 +00:00
strnlen is not used now
This commit is contained in:
parent
3bbd45dd86
commit
4fa6e9938c
@ -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")
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user