aboutsummaryrefslogtreecommitdiffstats
path: root/test/dl
Commit message (Collapse)AuthorAgeFilesLines
* * ruby.c (load_file_internal): set default source encoding asnaruse2012-11-061-0/+1
| | | | | | | | | 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
* * ext/dl/lib/dl/struct.rb: fix strange require order. [ruby-dev:45702]tenderlove2012-10-302-4/+0
| | | | | | | | | | | * 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
* * test/dl/test_func.rb (test_qsort1, test_qsort2): use TYPE_SIZE_Tngoto2012-06-131-2/+2
| | | | | | | 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
* * test/dl/test_c_{struct_entry,union_entity}.rb: sorry, typos.usa2012-06-062-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/dl/test_c_{struct,union}_entity.rb: broken require.usa2012-06-042-2/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/lib/dl/struct.rb (DL::CStructEntity#set_ctypes): Refactoreddrbrain2012-05-311-0/+12
| | | | | | | | | | | #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
* * test/dl/test_c_struct_entry.rb: Removed duplicated testdrbrain2012-05-311-5/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/lib/dl/struct.rb (DL::CStructEntity::size): Refactored ::sizedrbrain2012-05-311-0/+46
| | | | | | | | | | 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
* * ext/dl/lib/dl/struct.rb (DL::CUnionEntity#set_ctypes): Refactoreddrbrain2012-05-301-0/+12
| | | | | | | | | | #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
* * ext/dl/lib/dl/struct.rb (DL::CUnionEntity::size): Fixed ::size todrbrain2012-05-301-0/+18
| | | | | | | | | | 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
* * ext/dl/dl.c (Init_dl): support intrinsic types, size_t, ptrdiff_tnobu2012-02-252-0/+32
| | | | | | | | 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
* * test/dl/test_callback.rb (test_callback_with_string): preventsnagachika2011-08-301-2/+5
| | | | | | temporary string from GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fiddle/helper.rb (libc_so, libm_so): Solaris support added.ngoto2011-08-091-2/+2
| | | | | | | | * 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
* * ext/dl/cptr.c (rb_dlptr_aref, rb_dlptr_aset): check NULL pointernobu2011-07-281-0/+6
| | | | | | dereference. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cfunc.c (dlcfunc_mark), ext/dl/cptr.c (dlptr_mark):nobu2011-07-271-0/+5
| | | | | | | 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
* Add test for r32586.naruse2011-07-201-0/+11
| | | | | | | | | | 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
* * remove trailing spaces.nobu2011-05-151-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/dl/test_base.rb (DL::LIBC_SO): its always msvc*.dll onusa2011-04-281-1/+1
| | | | | | | mswin/mingw. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_process.rb (TestProcess#test_no_curdir): skip silently onusa2011-03-251-3/+2
| | | | | | | | | | | | | | | | | 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
* * test/dl/test_dl2.rb (TestDL#test_sin): math functions do notnobu2011-01-302-0/+3
| | | | | | | 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
* Creating dummy library for dl/fiddle tests on AIX.kanemoto2010-08-261-0/+28
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* forgot to commit the assert_match()tenderlove2010-07-051-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/lib/dl/import.rb (handler): add a more helpful error messagetenderlove2010-07-051-0/+9
| | | | | | | 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
* * ext/dl/lib/dl/func.rb (call): don't overwrite original argumentstarui2010-06-251-0/+12
| | | | | | | | 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
* * test/dl/test_cfunc.rb: test for r28156tenderlove2010-06-041-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/lib/dl/cparser.rb (parse_ctype): add backwards compatibilitytenderlove2010-06-021-0/+13
| | | | | | | 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
* * test/dl/test_cfunc.rb (test_last_error): CFunc.last_error is thread localusa2010-06-021-4/+6
| | | | | | | 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
* Fix test to follow the behavior of NetBSD's dlsym.naruse2010-05-191-2/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/dl/test_func.rb (test_sinf): sinf() doesn't exist in the standard of C.usa2010-05-191-2/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/dl/test_callback.rb: fixing valgrind errors. Ruby string may betenderlove2010-05-091-1/+2
| | | | | | GC'd before the callback returns. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/dl/test_base.rb (libc_so, libm_so): supports solaris.yugui2010-05-081-0/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/dl/test_base.rb: add kfreebsd support. based on a patch frommame2010-04-231-0/+3
| | | | | | | 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
* * test/dl/test_handle.rb: skip some tests on mswin/mingw.wanabe2010-03-201-0/+3
| | | | | | 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
* * test/dl/test_cfunc.rb (test_to_s): a result of sprintf("%x", ptr)wanabe2010-03-191-1/+1
| | | | | | may contain 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/dl/test_dl2.rb (DL::TestDL#ptr2num): add for LLP64.wanabe2010-03-191-4/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/dl/test_dl2.rb: require 'dl/func' to refer DL::Function.wanabe2010-03-191-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/dl/test_method.rb: delete a residual test for dl on libffi.mame2010-03-091-11/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/dl/test_closure.rb: forget to revert at r26764.muraken2010-03-021-130/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/dl/test_method.rb: sinf(3) is in libm.naruse2010-02-171-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/dl/test_{base,handle}.rb: use more verbose assertions.nobu2010-02-163-14/+14
| | | | | | | | * 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
* * ext/dl/method.c: Adding DL::Method as a superclass for DL::Functiontenderlove2010-02-161-0/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/dl/test_handle.rb (test_NEXT): fix for BSD.naruse2010-02-071-2/+29
| | | | | | | 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
* Wed Feb 3 10:12:09 2010 Aaron Patterson <tenderlove@ruby-lang.org>tenderlove2010-02-034-6/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* use require_relative.akr2010-02-021-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/dl/test_callback.rb testing callback removaltenderlove2009-12-072-0/+23
| | | | | | * 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
* * ext/dl/cptr.c (to_int): DL::CPtr supports to_inttenderlove2009-12-041-0/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/dl/test_callback.rb (**): using DL::Function to test callbackstenderlove2009-12-041-3/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/dl/test_callback.rb (**): testing return values of dl callbackstenderlove2009-12-031-0/+23
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/dl/test_cptr.rb (**): using ruby_xfree instead of libc's freetenderlove2009-11-132-5/+5
| | | | | | * test/dl/test_func.rb (test_strdod): strtod needs a char ** argument git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cptr.c (rb_dlptr_s_to_ptr): when wrapping a pointer it shouldtenderlove2009-11-121-1/+1
| | | | | | | 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