ruby/ext/json/parser/extconf.rb
Jean Boussier ec171b4075 [ruby/json] Move create_addtions logic in Ruby.
By leveraging the `on_load` callback we can move all this logic
out of the parser. Which mean we no longer have to duplicate
that logic in both parser and that we'll later be able to extract
it entirely from the gem.

https://github.com/ruby/json/commit/f411ddf1ce
2025-03-28 12:44:53 +09:00

12 lines
360 B
Ruby

# frozen_string_literal: true
require 'mkmf'
have_func("rb_enc_interned_str", "ruby.h") # RUBY_VERSION >= 3.0
have_func("rb_hash_new_capa", "ruby.h") # RUBY_VERSION >= 3.2
have_func("rb_hash_bulk_insert", "ruby.h") # Missing on TruffleRuby
have_func("strnlen", "string.h") # Missing on Solaris 10
append_cflags("-std=c99")
create_makefile 'json/ext/parser'