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

ruby-changes:60800

From: Nobuyoshi <ko1@a...>
Date: Fri, 17 Apr 2020 00:53:44 +0900 (JST)
Subject: [ruby-changes:60800] a0bc3f2a1c (master): Suppress C4267 "possible loss of data" warnings

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

From a0bc3f2a1c2c98f225612101cb4e1ea1a6813546 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Fri, 17 Apr 2020 00:27:47 +0900
Subject: Suppress C4267 "possible loss of data" warnings


diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index f20bfc8..cd5a62d 100644
--- a/ext/win32ole/win32ole.c
+++ b/ext/win32ole/win32ole.c
@@ -2651,7 +2651,7 @@ ole_invoke(int argc, VALUE *argv, VALUE self, USHORT wFlags, BOOL is_bracket) https://github.com/ruby/ruby/blob/trunk/ext/win32ole/win32ole.c#L2651
         /*------------------------------------------
           hash object ==> named dispatch parameters
         --------------------------------------------*/
-        cNamedArgs = rb_long2int(RHASH_SIZE(param));
+        cNamedArgs = SIZET2NUM(RHASH_SIZE(param));
         op.dp.cArgs = cNamedArgs + argc - 2;
         op.pNamedArgs = ALLOCA_N(OLECHAR*, cNamedArgs + 1);
         op.dp.rgvarg = ALLOCA_N(VARIANTARG, op.dp.cArgs);
-- 
cgit v0.10.2


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

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