ruby-changes:30135
From: zzak <ko1@a...>
Date: Fri, 26 Jul 2013 14:07:09 +0900 (JST)
Subject: [ruby-changes:30135] zzak:r42187 (trunk): * ext/fiddle/*: [DOC] More doc on dlopen and RTLD_DEFAULT from r42186
zzak 2013-07-26 14:06:57 +0900 (Fri, 26 Jul 2013) New Revision: 42187 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42187 Log: * ext/fiddle/*: [DOC] More doc on dlopen and RTLD_DEFAULT from r42186 Modified files: trunk/ChangeLog trunk/ext/fiddle/handle.c trunk/ext/fiddle/lib/fiddle.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 42186) +++ ChangeLog (revision 42187) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Jul 26 14:05:19 2013 Zachary Scott <e@z...> + + * ext/fiddle/*: [DOC] More doc on dlopen and RTLD_DEFAULT from r42186 + Fri Jul 26 13:08:53 2013 Zachary Scott <e@z...> * ext/fiddle/lib/fiddle.rb: [DOC] Document Fiddle.dlopen(nil) Index: ext/fiddle/lib/fiddle.rb =================================================================== --- ext/fiddle/lib/fiddle.rb (revision 42186) +++ ext/fiddle/lib/fiddle.rb (revision 42187) @@ -33,9 +33,13 @@ module Fiddle https://github.com/ruby/ruby/blob/trunk/ext/fiddle/lib/fiddle.rb#L33 # Fiddle::Handle. # # If +nil+ is given for the +library+, Fiddle::Handle::DEFAULT is used, which - # usually means +libc+. + # is the equivalent to RTLD_DEFAULT. See <code>man 3 dlopen</code> for more. # - # libc = Fiddle.dlopen(nil) + # lib = Fiddle.dlopen(nil) + # + # The default is dependent on OS, and provide a handle for all libraries + # already loaded. For example, in most cases you can use this to access + # +libc+ functions, or ruby functions like +rb_str_new+. # # See Fiddle::Handle.new for more. def dlopen library Index: ext/fiddle/handle.c =================================================================== --- ext/fiddle/handle.c (revision 42186) +++ ext/fiddle/handle.c (revision 42187) @@ -117,11 +117,14 @@ predefined_fiddle_handle(void *handle) https://github.com/ruby/ruby/blob/trunk/ext/fiddle/handle.c#L117 * * Create a new handler that opens +library+ with +flags+. * - * If no +library+ is specified or +nil+ is given, RTLD_DEFAULT is used, which - * usually means +libc+. + * If no +library+ is specified or +nil+ is given, DEFAULT is used, which is + * the equivalent to RTLD_DEFAULT. See <code>man 3 dlopen</code> for more. * - * libc = Fiddle::Handle.new + * lib = Fiddle::Handle.new * + * The default is dependent on OS, and provide a handle for all libraries + * already loaded. For example, in most cases you can use this to access +libc+ + * functions, or ruby functions like +rb_str_new+. */ static VALUE rb_fiddle_handle_initialize(int argc, VALUE argv[], VALUE self) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/