lib/ngt/ffi.rb in ngt-0.3.3 vs lib/ngt/ffi.rb in ngt-0.4.0

- old
+ new

@@ -66,17 +66,12 @@ attach_function :ngt_get_property_edge_size_for_search, %i[pointer pointer], :int16 attach_function :ngt_get_property_distance_type, %i[pointer pointer], :distance_type attach_function :ngt_create_error_object, %i[], :pointer attach_function :ngt_get_error_string, %i[pointer], :string attach_function :ngt_destroy_error_object, %i[pointer], :void - - begin - attach_function :ngt_create_optimizer, %i[bool pointer], :pointer - attach_function :ngt_optimizer_adjust_search_coefficients, %i[pointer string pointer], :bool - attach_function :ngt_optimizer_execute, %i[pointer string string pointer], :bool - attach_function :ngt_optimizer_set, %i[pointer int int int float float float float double double pointer], :bool - attach_function :ngt_destroy_optimizer, %i[pointer], :void - rescue ::FFI::NotFoundError - # only available in 1.8.1+ - end + attach_function :ngt_create_optimizer, %i[bool pointer], :pointer + attach_function :ngt_optimizer_adjust_search_coefficients, %i[pointer string pointer], :bool + attach_function :ngt_optimizer_execute, %i[pointer string string pointer], :bool + attach_function :ngt_optimizer_set, %i[pointer int int int float float float float double double pointer], :bool + attach_function :ngt_destroy_optimizer, %i[pointer], :void end end