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

[ruby/reline] Check TYPE_VARIADIC

https://github.com/ruby/reline/commit/8e62e46e33
This commit is contained in:
aycabta 2021-07-28 23:26:41 +09:00
parent 0f496b9b29
commit b158b4666d

View file

@ -19,6 +19,10 @@ module Reline::Terminfo
else
fiddle_supports_variadic = false
end
if fiddle_supports_variadic and Fiddle.const_defined?(:TYPE_VARIADIC)
# If the libffi version is not 3.0.5 or higher, there isn't TYPE_VARIADIC.
fiddle_supports_variadic = false
end
if fiddle_supports_variadic
%w[libncursesw.so libcursesw.so libncurses.so libcurses.so].each do |curses_name|
result = Fiddle::Handle.new(curses_name)