tenderlove
b386fe21ec
Wed Feb 3 10:12:09 2010 Aaron Patterson <tenderlove@ruby-lang.org>
...
* 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-03 01:23:48 +00:00
tenderlove
6cf6d8556c
* ext/dl/cptr.c (rb_dlptr_size) splitting function to reduce complexity
...
* ext/dl/cptr.c (rb_dlptr_null_p, rb_dlptr_aref, rb_dlptr_aset) adding
documentation
* ext/dl/dl.c (rb_dl_free) adding documentation
* test/dl/test_cptr.rb (test_null?, test_size, test_size=,
test_aref_aset) Improving test coverage
* test/dl/test_dl2.rb (test_free_secure) improving test coverage
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-01 01:46:44 +00:00
tenderlove
5f3d0f5233
* test/dl/test_dl2.rb (**) testing malloc and realloc
...
* ext/dl/dl.c (**) adding documentation
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-01 01:46:27 +00:00
tenderlove
5ee251bdad
* ext/ext/dl/handle.c (rb_dlhandle_initialize) added rb_secure(2)
...
[ruby-core:25762]
* ext/dl/dl.c (rb_dl_dlopen) removed rb_secure(2)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-23 16:44:41 +00:00
nobu
3b759e62ac
* ext/dl/dl.c (Init_dl): protoized.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-09 06:25:14 +00:00
nobu
1001173ccd
* ext/dl/dl.c (rb_dl_init_callbacks): autoloads callbacks.
...
* ext/dl/callback: split from dl.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03 06:40:40 +00:00
matz
199a95775b
* ext/dl/cfunc.c (rb_dlcfunc_call): add taint check.
...
* ext/dl/dl.c (rb_dl_malloc): add rb_secure(2).
* ext/dl/dl.c (rb_dl_realloc): ditto.
* ext/dl/dl.c (rb_dl_free): ditto.
* ext/dl/dl.c (rb_dl_ptr2value): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 11:33:44 +00:00
nobu
2b592580bf
* include/ruby: moved public headers.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-10 03:06:15 +00:00
ttate
d01f22ec7c
conformed to the usage of FUNC_CDECL/STDCALL described in [ruby-dev:28970].
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-06 19:59:31 +00:00
matz
1564ed2f0a
* bignum.c: ruby 1.9 HEAD 64 bit warnings clean up from
...
<ville.mattila at stonesoft.com>. [ruby-core:08120]
* ChangeLog: remove some direct reference to mail addresses
to prevent spams.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-03 20:07:10 +00:00
ttate
a7c5e6bcec
Added DL::BUILD_RUBY_PLATFORM,BUILD_RUBY_VERSION.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-14 20:59:07 +00:00
ttate
c1f29da23d
added bcc32 support [ruby-dev:25657] and fixed a minor bug.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-08 09:18:16 +00:00
ttate
dca41072d3
Added VC++ support thanks to U.Nakamura's patch. [ruby-dev:25644]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-06 18:07:10 +00:00
akr
a9639c22ef
* ext/dl/dl.c (Init_dl): function declaration should precede
...
statements before C99.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-06 02:32:40 +00:00
ttate
bda37095ca
added new files.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-04 13:35:37 +00:00
ttate
4ae9132605
remove all files to replace ruby-dl with ruby-dl2.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-04 13:29:49 +00:00
akr
78f7b7036b
* rubyio.h, io.c, ext/dl/dl.c, ext/pty/pty.c, ext/socket/socket.c:
...
create FILE object only when required: popen(3) and DL's IO#to_ptr.
[ruby-dev:25122]
* io.c (rb_io_binmode): use setmode for Human68k. [ruby-dev:25121]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-08 13:26:27 +00:00
ttate
f7a5ee56d7
Use 'P' instead of 'p' in types.rb.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-25 08:15:29 +00:00
ttate
c863d62b6f
Merged Nakada-san's patch [ruby-core:02916].
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-23 08:11:36 +00:00
usa
51e7fc687e
* ext/dl/dl.c (rb_dl_callback): use rb_block_proc() instead of
...
rb_block_new().
* ext/win32ole/win32ole.c (ev_on_event): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-16 07:25:38 +00:00
matz
bad7546f15
* gc.c (define_final): eliminate rb_f_lambda() call.
...
* class.c (rb_scan_args): ditto.
* signal.c (sig_trap): ditto.
* hash.c (rb_hash_initialize): ditto.
* variable.c (rb_f_trace_var): ditto.
* ext/dl/dl.c (rb_dl_callback): ditto.
* ext/win32ole/win32ole.c (ev_on_event): ditto.
* eval.c (ruby_cleanup): $SAFE is turned off in the finalization.
Each END proc should preserve its own $SAFE level. [ruby-core:01119]
* marshal.c (marshal_load): remove unused variable "hash".
[ruby-core:01120]
* hash.c (env_str_new): freeze strings from ENV. [ruby-talk:72860]
* array.c (rb_ary_first): optional argument to retrieve first n
elements.
* array.c (rb_ary_last): optional argument to retrieve last n
elements.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-06 09:44:22 +00:00
matz
ece972717b
security enhancement of dl library (need test).
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-24 09:38:37 +00:00
ttate
ab7dac4027
Added rb_secure(4). (Thanks to Minero Aoki)
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-24 07:56:37 +00:00
michal
4e13d36561
-Wall cleanups (removed unused vars, no 'code has no effect' warnings)
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-16 07:38:40 +00:00
ttate
dc260404fe
dlsizeof() should handle 'S' and 's'.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-26 10:53:11 +00:00
ttate
8e3721dfa8
Get rid of ineffective symbols, lines, constants and so on.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-07 16:42:07 +00:00
ttate
3a86596df1
fixed rb_ary2cary() to convert nil.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-05 13:11:29 +00:00
ttate
45a08a4296
Conform to the allocation framework.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-04 13:49:13 +00:00
ttate
28b8274e51
Include ctype.h for isdigit().
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-11 14:59:43 +00:00
ttate
5434d73ef7
Get rid of STR2CSTR. (Thanks N.Nakada)
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-11 14:44:53 +00:00
ttate
176542da7f
bugfix. (Thanks U.Nakamura)
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-11 11:16:56 +00:00
H_Konishi
d0b3651906
new platform [bccwin32] merged.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-11 01:27:48 +00:00
ttate
abca067fb6
dl.c (rb_dl_scan_callback_args): memcpy() -> cast and substitution
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-10 07:52:10 +00:00
ttate
2d5b7f7365
* ext/dl: change the callback mechanism.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-09 17:47:34 +00:00
ttate
4bf76b4e6c
rename PtrData::alloc and Struct#alloc to malloc respectively.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-20 15:35:48 +00:00
ttate
849fb05bb1
Add DL::DLSTACK.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-15 06:23:05 +00:00
ttate
1502ea7c0c
Patch [ruby-dev:16747] (Thanks Nakada)
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-04 08:27:48 +00:00
ttate
74b4c81396
Merge Nakada's patch and define StringValuePtr for ruby-1.6.
...
CV ----------------------------------------------------------------------
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-03 11:59:01 +00:00
ttate
7d711b817e
Add ruby-dl
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-02 10:56:13 +00:00