Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix GH-145 lib/fiddle/truffleruby.rb is based on https://github.com/oracle/truffleruby/blob/master/lib/truffle/truffle/fiddle_backend.rb . Here are changes for it: * Add `Fiddle::Types::VARIADIC` * Add `Fiddle::Types::CONST_STRING` * Add `Fiddle::Types::BOOL` * Add `Fiddle::ALIGN_BOOL` * Add `Fiddle::SIZEOF_BOOL` * Add `Fiddle::SIZEOF_CONST_STRING` * Add support for specifying type as not only `Fiddle::Types::*` but also `Symbol` like `:int` * Add `Fiddle::Error` as base the error class * Add support for `Fiddle::Pointer.malloc {}` `Fiddle::Pointer` * Add support for `Fiddle.free(#to_int)` * Accept `Fiddle::Function(need_gvl:)` but it's just ignored * `Fiddle::Function#initialize`: Add an argument validation * `Fiddle::Function#initialize`: Keep arguments as instance variables for getters * Add support for `Fiddle::Handle.sym` * Add support for `Fiddle::Handle.[]` * Add support for `Fiddle::Handle.sym_defined?` * Add support for `Fiddle::Handle#sym` * Add support for `Fiddle::Handle#[]` * Add support for `Fiddle::Handle#sym_defined?` * Add support for `Fiddle::Pointer.malloc` * Add support for `Fiddle::Pointer.to_ptr(#to_ptr)` * Add support for `Fiddle::Pointer#free=` * Add `Fiddle::Pointer#freed?` * Add support for `Fiddle::Pointer#call_free` * Add support for `Fiddle::Pointer#to_i` * Add support for `Fiddle::Pointer#to_int` * Add support for `Fiddle::Pointer#ptr` * Add support for `Fiddle::Pointer#+@` * Add support for `Fiddle::Pointer#ref` * Add support for `Fiddle::Pointer#-@` * Add support for `Fiddle::Pointer#null?` * Add support for `Fiddle::Pointer#to_s` * Add support for `Fiddle::Pointer#to_str` * Add support for `Fiddle::Pointer#inspect` * Add support for `Fiddle::Pointer#<=>` * Add support for `Fiddle::Pointer#==` * Add support for `Fiddle::Pointer#eql?` * Add support for `Fiddle::Pointer#+` * Add support for `Fiddle::Pointer#-` * Add support for `Fiddle::Pointer#[]=` * Add support for `Fiddle::Pointer#size` * Add support for `Fiddle::Pointer#size=` * Add `Fiddle::ClearedReferenceError` * Add no-op `Fiddle::Pinned` * Add `Fiddle::NULL` Some features are still "not implemented". So there are some "omit"s for TruffleRuby in tests.
- Loading branch information