From 7f34c75b8beeb3f391a2b381873fc16c6fa1f463 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Sat, 30 Nov 2024 02:41:22 +0900 Subject: [PATCH] Use `RSTRING_PTR` instead of `StringValuePtr` ... since it is certain to be a String in this context. Also, I want to avoid the anxious use of `StringValuePtr(str)` and `RSTRING_LEN(str)` as arguments in the same function call. --- compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compile.c b/compile.c index 5831e96908..c689349efb 100644 --- a/compile.c +++ b/compile.c @@ -14649,7 +14649,7 @@ ibf_load_setup(struct ibf_load *load, VALUE loader_obj, VALUE str) str = rb_str_new(RSTRING_PTR(str), RSTRING_LEN(str)); } - ibf_load_setup_bytes(load, loader_obj, StringValuePtr(str), RSTRING_LEN(str)); + ibf_load_setup_bytes(load, loader_obj, RSTRING_PTR(str), RSTRING_LEN(str)); RB_OBJ_WRITE(loader_obj, &load->str, str); }