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

ruby-changes:56746

From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Thu, 1 Aug 2019 16:20:20 +0900 (JST)
Subject: [ruby-changes:56746] 卜部昌平: fd0e3bd249 (master): fix VC 2013 compile error

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

From fd0e3bd2497d4e796b719c7b7154dc3c945f87b1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?=
 <shyouhei@r...>
Date: Thu, 1 Aug 2019 16:18:45 +0900
Subject: fix VC 2013 compile error

It seems the compiler does not support VLAs.
See also: https://ci.appveyor.com/project/ruby/ruby/builds/26392589/job/px6nuiuw4e78weg1

diff --git a/ext/-test-/bug-14834/bug-14384.c b/ext/-test-/bug-14834/bug-14384.c
index 58abd6d..0d4103b 100644
--- a/ext/-test-/bug-14834/bug-14384.c
+++ b/ext/-test-/bug-14834/bug-14384.c
@@ -28,8 +28,8 @@ g(MAYBE_UNUSED(VALUE q), void* w) https://github.com/ruby/ruby/blob/trunk/ext/-test-/bug-14834/bug-14384.c#L28
     const int *e = (const int *)w;
     const int  r = *e++;
     const int  t = *e++;
-    VALUE      y[t];
-    int        u[t];
+    VALUE     *y = ALLOCA_N(VALUE, t);
+    int       *u = ALLOCA_N(int, t);
 
     rb_profile_frames(r, t, y, u);
 }
-- 
cgit v0.10.2


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

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