[前][次][番号順一覧][スレッド一覧]

ruby-changes:58817

From: Koichi <ko1@a...>
Date: Mon, 18 Nov 2019 10:37:45 +0900 (JST)
Subject: [ruby-changes:58817] 5e34ab5406 (master): add casts.

https://git.ruby-lang.org/ruby.git/commit/?id=5e34ab5406

From 5e34ab5406942d43b4c0fbccfc153409d0386d1e Mon Sep 17 00:00:00 2001
From: Koichi Sasada <ko1@a...>
Date: Mon, 18 Nov 2019 10:36:48 +0900
Subject: add casts.

add casts to avoid compile error.
http://ci.rvm.jp/results/trunk_clang_39@silicon-docker/2402215

diff --git a/insns.def b/insns.def
index 0388a36..39b0554 100644
--- a/insns.def
+++ b/insns.def
@@ -1497,7 +1497,7 @@ opt_invokebuiltin_delegate https://github.com/ruby/ruby/blob/trunk/insns.def#L1497
 (VALUE ret)
 // attr bool leaf = false; /* anything can happen inside */
 {
-    ret = vm_invoke_builtin_delegate(ec, reg_cfp, bf, index);
+    ret = vm_invoke_builtin_delegate(ec, reg_cfp, bf, (unsigned int)index);
 }
 
 /* call specific function with args (same parameters) and leave */
@@ -1508,7 +1508,7 @@ opt_invokebuiltin_delegate_leave https://github.com/ruby/ruby/blob/trunk/insns.def#L1508
 (VALUE val)
 // attr bool leaf = false; /* anything can happen inside */
 {
-    val = vm_invoke_builtin_delegate(ec, reg_cfp, bf, index);
+    val = vm_invoke_builtin_delegate(ec, reg_cfp, bf, (unsigned int)index);
 
     /* leave fastpath */
     /* TracePoint/return should fallback this insn to opt_invokebuiltin_delegate */
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index a4d2fbc..616945f 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -4989,7 +4989,7 @@ vm_invoke_builtin(rb_execution_context_t *ec, rb_control_frame_t *cfp, const str https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L4989
 }
 
 static VALUE
-vm_invoke_builtin_delegate(rb_execution_context_t *ec, rb_control_frame_t *cfp, const struct rb_builtin_function *bf, int start_index)
+vm_invoke_builtin_delegate(rb_execution_context_t *ec, rb_control_frame_t *cfp, const struct rb_builtin_function *bf, unsigned int start_index)
 {
     if (0) { // debug print
         fprintf(stderr, "vm_invoke_builtin_delegate: passing -> ");
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]