summaryrefslogtreecommitdiff
path: root/test/dl
AgeCommit message (Collapse)Author
2012-11-27* ext/fiddle/handle.c: Make Fiddle independent of DL, copy DL::Handletenderlove
to Fiddle::Handle. * ext/fiddle/pointer.c: Make Fiddle independent of DL, copy DL::Pointer to Fiddle::Pointer. * test/fiddle/test_func.rb: relevent tests * test/fiddle/test_handle.rb: ditto * test/fiddle/test_pointer.rb: ditto * ext/dl/lib/dl/struct.rb: use Fiddle::Pointer if available * ext/fiddle/extconf.rb: check for dlfcn.h * ext/fiddle/fiddle.c: add constants for sizeof() things * ext/fiddle/fiddle.h: include dlfcn.h * ext/fiddle/function.c: expose a C function for creating new Fiddle::Function objects. * ext/fiddle/lib/fiddle.rb: include constants for dl backwards compat * ext/fiddle/lib/fiddle/function.rb: read the pointer from the function for dl backwards compat. * test/dl/test_callback.rb: check the addresses of the pointers rather than their types. * test/fiddle/helper.rb: remove dependency on dl * test/fiddle/test_closure.rb: ditto * test/fiddle/test_fiddle.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-27reverting r37881tenderlove
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-27* ext/fiddle/handle.c: Make Fiddle independent of DL, copy DL::Handletenderlove
to Fiddle::Handle. * ext/fiddle/pointer.c: Make Fiddle independent of DL, copy DL::Pointer to Fiddle::Pointer. * test/fiddle/test_func.rb: relevent tests * test/fiddle/test_handle.rb: ditto * test/fiddle/test_pointer.rb: ditto * ext/dl/lib/dl/struct.rb: use Fiddle::Pointer if available * ext/fiddle/extconf.rb: check for dlfcn.h * ext/fiddle/fiddle.c: add constants for sizeof() things * ext/fiddle/fiddle.h: include dlfcn.h * ext/fiddle/function.c: expose a C function for creating new Fiddle::Function objects. * ext/fiddle/lib/fiddle.rb: include constants for dl backwards compat * ext/fiddle/lib/fiddle/function.rb: read the pointer from the function for dl backwards compat. * test/dl/test_callback.rb: check the addresses of the pointers rather than their types. * test/fiddle/helper.rb: remove dependency on dl * test/fiddle/test_closure.rb: ditto * test/fiddle/test_fiddle.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-06* ruby.c (load_file_internal): set default source encoding asnaruse
UTF-8 instead of US-ASCII. [ruby-core:46021] [Feature #6679] * parse.y (parser_initialize): set default parser encoding as UTF-8 instead of US-ASCII. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-30* ext/dl/lib/dl/struct.rb: fix strange require order. [ruby-dev:45702]tenderlove
* ext/dl/lib/dl/value.rb: ditto * test/dl/test_c_struct_entry.rb: remove strange require order from tests. * test/dl/test_c_union_entity.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13* test/dl/test_func.rb (test_qsort1, test_qsort2): use TYPE_SIZE_Tngoto
for size_t variables. [ruby-dev:45733] [Bug #6584] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-06* test/dl/test_c_{struct_entry,union_entity}.rb: sorry, typos.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-04* test/dl/test_c_{struct,union}_entity.rb: broken require.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-31* ext/dl/lib/dl/struct.rb (DL::CStructEntity#set_ctypes): Refactoreddrbrain
#set_ctypes using newer ruby features to simplify its implementation. * test/dl/test_c_struct_entry.rb (class DL): Test to verify refactoring. Reviewed by Aaron Patterson. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-31* test/dl/test_c_struct_entry.rb: Removed duplicated testdrbrain
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-31* ext/dl/lib/dl/struct.rb (DL::CStructEntity::size): Refactored ::sizedrbrain
to remove unused variables and simplify using newer ruby features. * test/dl/test_c_struct_entry.rb: Test to validate refactoring Reviewed by Aaron Patterson git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-30* ext/dl/lib/dl/struct.rb (DL::CUnionEntity#set_ctypes): Refactoreddrbrain
#set_types to reuse DL::CUnionEntity::size * test/dl/test_c_union_entity.rb: Added test Reviewed by Aaron Paterson git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-30* ext/dl/lib/dl/struct.rb (DL::CUnionEntity::size): Fixed ::size todrbrain
return the size of the union. * test/dl/test_c_union_entity.rb: Test for DL::CUnionEntity::size Reviewed by Aaron Patterson git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-25* ext/dl/dl.c (Init_dl): support intrinsic types, size_t, ptrdiff_tnobu
and intptr_t. [ruby-core:42460][Feature #5992] * ext/fiddle/fiddle.c (Init_fiddle): ditto. * ext/dl/lib/dl/cparser.rb (DL::CParser#parse_ctype): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30* test/dl/test_callback.rb (test_callback_with_string): preventsnagachika
temporary string from GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-09* test/fiddle/helper.rb (libc_so, libm_so): Solaris support added.ngoto
* test/dl/test_base.rb (libc_so, libm_so): on Solaris, remove libc and libm version numbers for detecting default libc and libm. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-28* ext/dl/cptr.c (rb_dlptr_aref, rb_dlptr_aset): check NULL pointernobu
dereference. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-27* ext/dl/cfunc.c (dlcfunc_mark), ext/dl/cptr.c (dlptr_mark):nobu
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
2011-07-20Add test for r32586.naruse
FreeBSD (at least 7.2 to 7.2) calls nsdispatch(3) when it calls getaddrinfo(3). And nsdispatch(3) doesn't call dlerror(3) even if it calls _nss_cache_cycle_prevention_function with dlsym(3). So our DL::Handle#sym must call dlerror(3) before call dlsym. In general uses of dlerror(3) should call it before use it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-28* test/dl/test_base.rb (DL::LIBC_SO): its always msvc*.dll onusa
mswin/mingw. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-25* test/ruby/test_process.rb (TestProcess#test_no_curdir): skip silently onusa
Windows, because this tests a platform specific feature and it'll never be supported on ruby on Windows. * test/ruby/test_dir_m17n.rb (TestDir_M17N#test_filename_extutf8_invalid, TestDir_M17N#test_filename_as_bytes_extutf8): ditto. * test/open-uri/test_open-uri.rb (TestOpenURI#test_find_proxy_case_sensitive_env): ditto. * test/dl/test_handle.rb (DL::TestHandle#test_NEXT, DL::TestHandle#test_DEFAULT): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-30* test/dl/test_dl2.rb (TestDL#test_sin): math functions do notnobu
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
2010-08-26Creating dummy library for dl/fiddle tests on AIX.kanemoto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-05forgot to commit the assert_match()tenderlove
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-05* ext/dl/lib/dl/import.rb (handler): add a more helpful error messagetenderlove
when calling import_symbol or import_function without calling dlload. Thanks nobu! [ruby-core:30996] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-25 * ext/dl/lib/dl/func.rb (call): don't overwrite original argumentstarui
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
2010-06-04* test/dl/test_cfunc.rb: test for r28156tenderlove
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-02* ext/dl/lib/dl/cparser.rb (parse_ctype): add backwards compatibilitytenderlove
by supporting "uint" types in the c parser. [ruby-core:29750] * test/dl/test_cparser.rb: adding a test for "uint" changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-02* test/dl/test_cfunc.rb (test_last_error): CFunc.last_error is thread localusa
variable. So, if another test calls CFunc#call, it's set. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-19Fix test to follow the behavior of NetBSD's dlsym.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-19* test/dl/test_func.rb (test_sinf): sinf() doesn't exist in the standard of C.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-09* test/dl/test_callback.rb: fixing valgrind errors. Ruby string may betenderlove
GC'd before the callback returns. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-08* test/dl/test_base.rb (libc_so, libm_so): supports solaris.yugui
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-23* test/dl/test_base.rb: add kfreebsd support. based on a patch frommame
Petr Salinger in [ruby-core:29769]. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560293 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-20* test/dl/test_handle.rb: skip some tests on mswin/mingw.wanabe
because RTLD_DEFAULT and RTLD_NEXT don't work well on windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-19* test/dl/test_cfunc.rb (test_to_s): a result of sprintf("%x", ptr)wanabe
may contain 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-19* test/dl/test_dl2.rb (DL::TestDL#ptr2num): add for LLP64.wanabe
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-19* test/dl/test_dl2.rb: require 'dl/func' to refer DL::Function.wanabe
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-09* test/dl/test_method.rb: delete a residual test for dl on libffi.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-02* test/dl/test_closure.rb: forget to revert at r26764.muraken
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-17* test/dl/test_method.rb: sinf(3) is in libm.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-16* test/dl/test_{base,handle}.rb: use more verbose assertions.nobu
* test/dl/test_import.rb (DL::LIBC::BoundQsortCallback): renamed to get rid of overwriting warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-16* ext/dl/method.c: Adding DL::Method as a superclass for DL::Functiontenderlove
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-07* test/dl/test_handle.rb (test_NEXT): fix for BSD.naruse
Linux and Darwin's RTLD_NEXT searchs second occurrence of the function. But FreeBSD and NetBSD's RTLD_NEXT searchs in libraries loaded after dl. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-03Wed Feb 3 10:12:09 2010 Aaron Patterson <tenderlove@ruby-lang.org>tenderlove
* 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
2010-02-02use require_relative.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-07* test/dl/test_callback.rb testing callback removaltenderlove
* test/dl/test_func.rb testing function names, to_i git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-04* ext/dl/cptr.c (to_int): DL::CPtr supports to_inttenderlove
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-04* test/dl/test_callback.rb (**): using DL::Function to test callbackstenderlove
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e