ruby-changes:62742
From: Kazuhiro <ko1@a...>
Date: Fri, 28 Aug 2020 22:06:00 +0900 (JST)
Subject: [ruby-changes:62742] 1c138327e0 (master): Try to fix compile error on windows
https://git.ruby-lang.org/ruby.git/commit/?id=1c138327e0 From 1c138327e0537bb55f7d0810f6fe7e1c7f63b6c5 Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA <zn@m...> Date: Fri, 28 Aug 2020 22:03:06 +0900 Subject: Try to fix compile error on windows https://github.com/ruby/ruby/runs/1041040167?check_suite_focus=true#step:11:177 ``` compiling ../src/re.c re.c ../src/re.c(317): error C2057: expected constant expression ../src/re.c(317): error C2466: cannot allocate an array of constant size 0 ../src/re.c(467): error C2057: expected constant expression ../src/re.c(467): error C2466: cannot allocate an array of constant size 0 ../src/re.c(467): error C2133: 'opts': unknown size ../src/re.c(559): error C2057: expected constant expression ../src/re.c(559): error C2466: cannot allocate an array of constant size 0 ../src/re.c(559): error C2133: 'optbuf': unknown size ../src/re.c(673): error C2057: expected constant expression ../src/re.c(673): error C2466: cannot allocate an array of constant size 0 ../src/re.c(673): error C2133: 'opts': unknown size NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\HostX64\x64\cl.EXE"' : return code '0x2' Stop. ``` diff --git a/re.c b/re.c index d0dbfaa..badd321 100644 --- a/re.c +++ b/re.c @@ -311,7 +311,7 @@ char_to_option(int c) https://github.com/ruby/ruby/blob/trunk/re.c#L311 return val; } -static const int OPTBUF_SIZE = 4; +enum { OPTBUF_SIZE = 4 }; static char * option_to_str(char str[OPTBUF_SIZE], int options) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/