From 801cdfefe26da4381c10f994a9f103feae003f18 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 30 Nov 2025 16:56:44 +0900 Subject: Fix wrong declaration of `rb_optimized_call` `recv` is used as the input argument to `GetProcPtr`, which is a `VALUE`. Fix up ruby/ruby#6691. --- jit.c | 2 +- yjit/src/cruby_bindings.inc.rs | 2 +- zjit/src/cruby_bindings.inc.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jit.c b/jit.c index 9399cb4026..c0b8f901ad 100644 --- a/jit.c +++ b/jit.c @@ -192,7 +192,7 @@ rb_jit_get_proc_ptr(VALUE procv) } VALUE -rb_optimized_call(VALUE *recv, rb_execution_context_t *ec, int argc, VALUE *argv, int kw_splat, VALUE block_handler) +rb_optimized_call(VALUE recv, rb_execution_context_t *ec, int argc, VALUE *argv, int kw_splat, VALUE block_handler) { rb_proc_t *proc; GetProcPtr(recv, proc); diff --git a/yjit/src/cruby_bindings.inc.rs b/yjit/src/cruby_bindings.inc.rs index 9216802a3c..57824f4911 100644 --- a/yjit/src/cruby_bindings.inc.rs +++ b/yjit/src/cruby_bindings.inc.rs @@ -1234,7 +1234,7 @@ extern "C" { pub fn rb_get_def_bmethod_proc(def: *mut rb_method_definition_t) -> VALUE; pub fn rb_jit_get_proc_ptr(procv: VALUE) -> *mut rb_proc_t; pub fn rb_optimized_call( - recv: *mut VALUE, + recv: VALUE, ec: *mut rb_execution_context_t, argc: ::std::os::raw::c_int, argv: *mut VALUE, diff --git a/zjit/src/cruby_bindings.inc.rs b/zjit/src/cruby_bindings.inc.rs index 969c5a4c69..0cd312abf9 100644 --- a/zjit/src/cruby_bindings.inc.rs +++ b/zjit/src/cruby_bindings.inc.rs @@ -2117,7 +2117,7 @@ unsafe extern "C" { pub fn rb_get_def_bmethod_proc(def: *mut rb_method_definition_t) -> VALUE; pub fn rb_jit_get_proc_ptr(procv: VALUE) -> *mut rb_proc_t; pub fn rb_optimized_call( - recv: *mut VALUE, + recv: VALUE, ec: *mut rb_execution_context_t, argc: ::std::os::raw::c_int, argv: *mut VALUE, -- cgit v1.2.3