@ptr should be updated. This fixes SEGV raised in DL::Function#call
after calling DL::Function#bind. [Bug #7516] [ruby-dev:46708]
* test/dl/test_func.rb (test_bind): test for the above
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ABI should be set by using CFunc#calltype even when Fiddle is used.
When Fiddle is used and a block is given, name shoud not be ignored.
[ruby-core:50562] [Bug #7514]
* ext/dl/lib/dl/import.rb (DL::Importer#bind_function): should respect
abi and name when Fiddle is used.
* test/dl/test_func.rb (test_name_with_block): test for "name" method
with giving a block.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
workaround to mark wrapped object. this is not a true fix,
because [Bug #4929] is caused by the interface design of DL.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
work on x86_64 due to the design of DL2.
* test/dl/test_func.rb (DL::TestFunc#test_{sinf,sin): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
to defend from GC.
* test/dl/test_func.rb (test_string): add test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/dl/function.c: DL::Function now uses libffi
* ext/dl/cfunc.c (rb_dl_set_last_error): set to non static so errors
can be exposed.
* ext/dl/closure.c: DL::Closure will now be used in place of
ext/dl/callback/*.
* ext/dl/dl.c: legacy callbacks removed in favor of libffi
* ext/dl/dl_converions.(c,h): used for converting ruby types to FFI
types.
* ext/dl/callback/*: replaced by libffi callbacks.
* ext/dl/lib/dl/callback.rb: Converting internal callbacks to use
DL::Closure
* ext/dl/lib/dl/closure.rb: Ruby parts of the new DL::Closure object
* ext/dl/lib/dl/import.rb: More conversion to use DL::Closure object
* ext/dl/lib/dl/value.rb (ruby2ffi): adding private method for
DL::CPtr to ffi value conversion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
keep a reference to the object it's wrapping
* test/dl/test_func.rb use standard test methods
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e