summaryrefslogtreecommitdiff
path: root/ext/dl/lib
AgeCommit message (Collapse)Author
2012-11-30suppress warnings: uninitialized variablesnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-27* ext/dl/lib/dl.rb: Deprecation notice for DLzzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37910 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@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-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-09-04remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-21* ext/dl/lib/dl/func.rb (DL::Function#bind): fixes an error inusa
test/dl/test_import.rb (DL::TestImport#test_carried_function) introduced by r36718. the instance of the anonymous class which wraps the block should have same methods and instance variables of self. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-17* ext/dl/lib/dl/func.rb (DL::Function#bind): allow to return/break fromusa
the callback method. (Fiddle already allows it.) [Bug #6389] [ruby-dev:45604] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36718 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* 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-05-30* ext/dl: Added documentation. Patch by Vincent Batts.drbrain
[ruby-trunk - Bug #6496] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35846 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
2012-02-09* ext/dl/lib/value.rb (DL::ValueUtil.{unsigned_value,signed_value}):usa
currenly pack/unpack does not accept "q!" and "Q!". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-09* ext/dl/lib/types.rb: Win64 support.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-16* ext/dl: Add documentation. Patch by Vincent Batts. [Ruby 1.9 - Bug #5192]drbrain
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-08* ext/dl/lib/dl/struct.rb: clean a warning: assigned but unusednaruse
variable. patched by Kouhei Yanagita. [ruby-dev:42722] * ext/dl/lib/dl/import.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30146 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-12* ext/dl/lib/dl.rb: don't require when already loaded.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28302 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-05-06* ext/fiddle/*: Adding fiddle library to wrap libffitenderlove
* test/fiddle/*: testing fiddle extension * ext/dl/lib/dl.rb: Requiring fiddle if it is available * ext/dl/lib/dl/callback.rb: using Fiddle if it is available * ext/dl/lib/dl/func.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-06Surpress warnings.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-19* ext/dl/lib/dl/pack.rb (DL#pack): allow LLP64.wanabe
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-25* ext/dl: revert dl with libffi because it can't run on mswin now.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26764 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-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
2009-05-23* ext/dl/lib/dl/cparser.rb (DL::CParser#parse_struct_signature):nobu
splitting with regexp source string is obsolete. a patch from Minwoo Lee at [ruby-core:23494]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-16* ext/dl/lib/dl/callback.rb (DL#remove_callback_internal): ignorenobu
unbound function. [ruby-dev:38474] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-10* ext/dl/lib/dl/func.rb (DL::Function#bound?): returns if alreadynobu
bound to a block. * ext/dl/lib/dl/value.rb (DL::ValueUtil#wrap_arg): block must be given if arg is not bound. [ruby-dev:38404] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-10* ext/dl/lib/dl/cparser.rb (DL::CParser#parse_signature): stripsnobu
spaces. based on a patch from Takashi Tamura in [ruby-dev:38398]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06* {ext,lib,test}/**/*.rb: removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03 * ext/dl/win32/lib/win32/resolv.rb: get rid of warning.usa
* ext/dl/lib/dl/func.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03 * ext/dl/lib/dl/func.rb (DL::Function.name): delegate to @cfunc.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03* ext/dl/lib/dl/cparser.rb (DL::CParser::parse_signature): fixednobu
variable name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03* ext/dl/lib/dl/pack.rb (DL::PackInfo): reduced redundantnobu
initialization. * ext/dl/lib/dl/stack.rb (DL::Stack): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03* ext/dl/lib/dl/value.rb (DL::ValueUtil#wrap_arg): NULL for nil.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-29* ext/dl/test/test_base.rb: add libc search logic.ko1
this patch is written by Takehiro Kubo. [ruby-core:20963] [Bug #932] * ext/dl/dl.h: Add ",..." as the last argument. this patch is written by Takehiro Kubo. Bug #633 [ruby-core:19289] * ext/dl/lib/dl/stack.rb: add add_padding() to calculate alignment. this patch is written by Takehiro Kubo. Bug #633 [ruby-core:19289] * ext/dl/test/test_func.rb: atof()'s return value is double. this patch is written by Takehiro Kubo. Bug #633 [ruby-core:19289] * ext/dl/test/test_import.rb: - atof()'s return value is double. - The types of qsort's second and third argument are size_t. - fprintf()'s return value is int. this patch is written by Takehiro Kubo. Bug #633 [ruby-core:19289] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-28* ext/dl/lib/dl/import.rb (DL::Importer#sizeof): followsyugui
a feature change in 1.9. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-28* ext/dl/lib/dl/import.rb (DL::Importer#extern): adds filename andyugui
line number to module_eval'ing for readability of backtrace. (DL::Importer#bind): ditto. * ext/dl/lib/dl/struct.rb (DL::CStructBuilder#create): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-12-31 * Merge YARVko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-30fixed the alignment problems discussed in [ruby-dev:28667].ttate
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-08should compare SIZEOF_VOIDP with SIZEOF_LONG_LONG.ttate
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-08if dlload fail to load a library, it should raise an error.ttate
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-09replaced the local variable 'entity' with an instance variable.ttate
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-08use DL::CStructBuilder instead of CStructBuilder.ttate
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-10CUnionEntity should inherit CStructEntity.ttate
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-08minor bugfix.ttate
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e