[ruby/json] Compile with std=c99
https://github.com/ruby/json/commit/d4968d2e48
This commit is contained in:
parent
cbd933bcf1
commit
a052d96103
@ -4,6 +4,7 @@ if RUBY_ENGINE == 'truffleruby'
|
||||
# The pure-Ruby generator is faster on TruffleRuby, so skip compiling the generator extension
|
||||
File.write('Makefile', dummy_makefile("").join)
|
||||
else
|
||||
append_cflags("-std=c99")
|
||||
$defs << "-DJSON_GENERATOR"
|
||||
create_makefile 'json/ext/generator'
|
||||
end
|
||||
|
@ -257,7 +257,7 @@ static void convert_UTF8_to_ASCII_only_JSON(FBuffer *out_buffer, VALUE str, cons
|
||||
}
|
||||
|
||||
for (short i = 1; i < ch_len; i++) {
|
||||
wchar = (wchar<<6) | (ptr[pos+i] & 0x3F);
|
||||
wchar = (wchar << 6) | (ptr[pos+i] & 0x3F);
|
||||
}
|
||||
|
||||
FLUSH_POS(ch_len);
|
||||
|
@ -29,4 +29,6 @@ rescue NoMethodError
|
||||
$CFLAGS << ' -DSTR_UMINUS_DEDUPE_FROZEN=0 '
|
||||
end
|
||||
|
||||
append_cflags("-std=c99")
|
||||
|
||||
create_makefile 'json/ext/parser'
|
||||
|
Loading…
x
Reference in New Issue
Block a user