Skip to content

Commit a3ee527

Browse files
authored
Merge pull request #895 from ruby/removed-strnlen
Removed old `strnlen` fallback
2 parents 5a12067 + 45deb20 commit a3ee527

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

ext/json/ext/parser/extconf.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
have_func("rb_str_to_interned_str", "ruby.h") # RUBY_VERSION >= 3.0
77
have_func("rb_hash_new_capa", "ruby.h") # RUBY_VERSION >= 3.2
88
have_func("rb_hash_bulk_insert", "ruby.h") # Missing on TruffleRuby
9-
have_func("strnlen", "string.h") # Missing on Solaris 10
109

1110
append_cflags("-std=c99")
1211

ext/json/ext/parser/parser.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -296,15 +296,6 @@ static void rvalue_stack_eagerly_release(VALUE handle)
296296
}
297297
}
298298

299-
300-
#ifndef HAVE_STRNLEN
301-
static size_t strnlen(const char *s, size_t maxlen)
302-
{
303-
char *p;
304-
return ((p = memchr(s, '\0', maxlen)) ? p - s : maxlen);
305-
}
306-
#endif
307-
308299
static int convert_UTF32_to_UTF8(char *buf, uint32_t ch)
309300
{
310301
int len = 1;

0 commit comments

Comments
 (0)