1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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.
```
This commit is contained in:
Kazuhiro NISHIYAMA 2020-08-28 22:03:06 +09:00
parent 7e1fddba4a
commit 1c138327e0
No known key found for this signature in database
GPG key ID: 262ED8DBB4222F7A

2
re.c
View file

@ -311,7 +311,7 @@ char_to_option(int c)
return val;
}
static const int OPTBUF_SIZE = 4;
enum { OPTBUF_SIZE = 4 };
static char *
option_to_str(char str[OPTBUF_SIZE], int options)