aboutsummaryrefslogtreecommitdiffstats
path: root/ext/dl
Commit message (Collapse)AuthorAgeFilesLines
* * ext/dl: Add documentation. Patch by Vincent Batts. [Ruby 1.9 - Bug #5192]drbrain2011-08-167-7/+393
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/callback/mkcallback.rb (gencallback): use PTR2NUM.nobu2011-07-281-11/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cptr.c (rb_dlptr_aref, rb_dlptr_aset): check NULL pointernobu2011-07-281-5/+11
| | | | | | dereference. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cptr.c (rb_dlptr_s_to_ptr): use rb_check_funcall.nobu2011-07-281-3/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cptr.c (rb_dlptr_s_to_ptr): fix wrapping condition.nobu2011-07-281-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cfunc.c (dlcfunc_mark), ext/dl/cptr.c (dlptr_mark):nobu2011-07-273-27/+57
| | | | | | | 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
* * ext/dl/handle.c (dlhandle_sym): clear previous error with dlerror()naruse2011-07-201-0/+3
| | | | | | before calling dlsym(). [ruby-dev:44091] [Bug #5021] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/sdbm/_sdbm.c (sdbm_open): use size_t.naruse2011-03-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | * ext/syck/bytecode.c: ditto. * ext/sdbm/_sdbm.c (delpair): use ptrdiff_t. * ext/sdbm/init.c: use RSTRING_LENINT. * ext/dl/handle.c: suppress warning: shorten-64-to-32. * ext/strscan/strscan.c: ditto. * ext/syck/emitter.c: ditto. * ext/syck/implicit.c: ditto. * ext/syck/syck.c: ditto. * ext/syck/token.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cfunc.c: parenthesize macro arguments.akr2011-02-111-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/dl.h: parenthesize macro arguments.akr2011-02-101-28/+28
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * Use _WIN32 rather than checking for windows.h. Thanks Jon Forums!tenderlove2011-01-053-7/+7
| | | | | | [ruby-core:33977] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/win32/registry.rb: Corrected RegCreateKeyExA signature.luislavena2010-12-251-1/+1
| | | | | | Patch by Rafal Michalski [ruby-core:33874] [Ruby 1.9-Bug#4203] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/lib/dl/struct.rb: clean a warning: assigned but unusednaruse2010-12-082-2/+0
| | | | | | | | 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
* * ext/dl/callback/mkcallback.rb (gencallback): shouldn't assume thatusa2010-11-251-1/+9
| | | | | | | VALUE is the same size with long. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (RUBY_CHECK_PRINTF_PREFIX): check for printf formatnobu2010-10-121-7/+9
| | | | | | specifier if possible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cfunc.c (rb_dlcfunc_call): workaround for VC9 for x64.usa2010-08-241-0/+6
| | | | | | | reported by kuwamoto shintaro in [ruby-dev:42125]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/win32/lib/win32/resolv.rb (get_info): get rid of a warning.usa2010-08-101-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* .cvsignore: have not been used already. [Bug #3468]nobu2010-08-071-10/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/{intern,io}.h: add missing prototypes.nobu2010-07-221-2/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (rb_data_type_t): restructured. [ruby-dev:41862]nobu2010-07-183-3/+3
| | | | | | | | add parent member. * error.c (rb_typeddata_inherited_p): new function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/handle.c (rb_dlhandle_close): should not pass a dynamicnobu2010-07-131-1/+1
| | | | | | | string to rb_raise directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/lib/dl/import.rb (handler): add a more helpful error messagetenderlove2010-07-051-2/+6
| | | | | | | 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-2/+2
| | | | | | | | 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/lib/dl.rb: don't require when already loaded.naruse2010-06-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cfunc.c (rb_dlcfunc_inspect): should taint the result.nobu2010-06-041-1/+4
| | | | | | | [ruby-dev:41533] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cfunc.c (rb_dlcfunc_inspect): suppress warnings bynobu2010-06-032-12/+2
| | | | | | | | | rb_sprintf. * ext/dl/cptr.c (rb_dlptr_s_malloc): suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/dl.h (DLSTACK_TYPE): type of stack is same as VALUE.usa2010-06-031-1/+1
| | | | | | | reported by sakiyama shin in [ruby-dev:41514] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/lib/dl/cparser.rb (parse_ctype): add backwards compatibilitytenderlove2010-06-021-1/+1
| | | | | | | 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
* * suppress warnings.nobu2010-05-213-24/+26
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/fiddle/*: Adding fiddle library to wrap libffitenderlove2010-05-065-71/+154
| | | | | | | | | * 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
* * ext/dl/cfunc.c (rb_dlcfunc_call): ignore signedness.nobu2010-05-021-2/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/**/*.[ch]: removed trailing spaces.nobu2010-04-222-9/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/win32/lib/win32/registry.rb (PredefinedKey#create): root keyusa2010-04-201-1/+1
| | | | | | | name should be a string. fixed [ruby-core:28192] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Surpress warnings.naruse2010-04-061-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cptr.c (rb_dlptr_inspect): fix format specifiers.nobu2010-04-011-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/lib/dl/pack.rb (DL#pack): allow LLP64.wanabe2010-03-191-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl: revert dl with libffi because it can't run on mswin now.naruse2010-02-2518-662/+390
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/dl_conversions.c (rb_dl_type_to_ffi_type): support signednobu2010-02-171-24/+26
| | | | | | | long long. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cfunc.c (rb_dlcfunc_inspect): get rid of overflow.nobu2010-02-174-5/+5
| | | | | | | | | | | * ext/dl/closure.c (dlc_callback, rb_dlclosure_init): ditto. * ext/dl/cptr.c (rb_dlptr_s_malloc): ditto. * ext/dl/method.c (rb_dlfunction_initialize): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/depend: updated.nobu2010-02-171-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cfunc.c (rb_dlcfunc_call): convert signed value tonobu2010-02-161-4/+13
| | | | | | | unsigned. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/dl/test_{base,handle}.rb: use more verbose assertions.nobu2010-02-162-9/+9
| | | | | | | | * 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-164-33/+34
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/function.c: using ULONG2NUM to fix tests on i686.tenderlove2010-02-151-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/{closure,function}.c: removed C99 features and warnings.nobu2010-02-032-147/+154
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Wed Feb 3 10:12:09 2010 Aaron Patterson <tenderlove@ruby-lang.org>tenderlove2010-02-0316-372/+619
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* * ext/dl/cptr.c (to_int): DL::CPtr supports to_inttenderlove2009-12-041-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cptr.c (rb_dlptr_s_to_ptr): when wrapping a pointer it shouldtenderlove2009-11-121-0/+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
* * ext/dl/cfunc.c (**) updating documentationtenderlove2009-11-081-6/+37
| | | | | | | * test/dl/test_cfunc.rb (test_ptr=, test_ptr) testing the pointer accessor methods on CFunc git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cptr.c (rb_dlptr_inspect): making inspect consistent acrosstenderlove2009-11-071-1/+1
| | | | | | | platforms * test/dl/test_cptr.rb (test_inspect): testing inspect git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e