Prefer RB_NUM2LONG for string length. (#7379)

This commit is contained in:
Samuel Williams 2023-02-25 23:04:10 +13:00 committed by GitHub
parent d3ee9e590c
commit d0031db9b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
Notes: git 2023-02-25 10:04:31 +00:00
Merged-By: ioquatix <samuel@codeotaku.com>

View File

@ -423,7 +423,7 @@ rb_io_buffer_type_for(VALUE klass, VALUE string)
VALUE
rb_io_buffer_type_string(VALUE klass, VALUE length)
{
VALUE string = rb_str_new(NULL, NUM2SIZET(length));
VALUE string = rb_str_new(NULL, RB_NUM2LONG(length));
struct io_buffer_for_yield_instance_arguments arguments = {
.klass = klass,