1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use size_t for rb_raw_obj_info

This commit is contained in:
Nobuyoshi Nakada 2022-07-05 22:39:08 +09:00
parent fbe3651466
commit 51025a9013
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6
Notes: git 2022-07-10 16:38:54 +09:00
2 changed files with 4 additions and 4 deletions

6
gc.c
View file

@ -13650,7 +13650,7 @@ rb_method_type_name(rb_method_type_t type)
FL_TEST((ary), RARRAY_EMBED_FLAG)!=0)
static void
rb_raw_iseq_info(char *buff, const int buff_size, const rb_iseq_t *iseq)
rb_raw_iseq_info(char *const buff, const size_t buff_size, const rb_iseq_t *iseq)
{
if (buff_size > 0 && ISEQ_BODY(iseq) && ISEQ_BODY(iseq)->location.label && !RB_TYPE_P(ISEQ_BODY(iseq)->location.pathobj, T_MOVED)) {
VALUE path = rb_iseq_path(iseq);
@ -13672,9 +13672,9 @@ str_len_no_raise(VALUE str)
}
const char *
rb_raw_obj_info(char *buff, const int buff_size, VALUE obj)
rb_raw_obj_info(char *const buff, const size_t buff_size, VALUE obj)
{
int pos = 0;
size_t pos = 0;
void *poisoned = asan_unpoison_object_temporary(obj);
#define BUFF_ARGS buff + pos, buff_size - pos

2
gc.h
View file

@ -112,7 +112,7 @@ int ruby_get_stack_grow_direction(volatile VALUE *addr);
#define IS_STACK_DIR_UPPER() STACK_DIR_UPPER(1,0)
const char *rb_obj_info(VALUE obj);
const char *rb_raw_obj_info(char *buff, const int buff_size, VALUE obj);
const char *rb_raw_obj_info(char *const buff, const size_t buff_size, VALUE obj);
VALUE rb_gc_disable_no_rest(void);