[前][次][番号順一覧][スレッド一覧]

ruby-changes:30132

From: zzak <ko1@a...>
Date: Fri, 26 Jul 2013 13:11:37 +0900 (JST)
Subject: [ruby-changes:30132] zzak:r42184 (trunk): * ext/fiddle/lib/fiddle.rb: [DOC] Document Fiddle.dlopen(nil)

zzak	2013-07-26 13:11:27 +0900 (Fri, 26 Jul 2013)

  New Revision: 42184

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42184

  Log:
    * ext/fiddle/lib/fiddle.rb: [DOC] Document Fiddle.dlopen(nil)
    * ext/fiddle/handle.c: [DOC] Document Fiddle::Handle.new(nil)

  Modified files:
    trunk/ChangeLog
    trunk/ext/fiddle/handle.c
    trunk/ext/fiddle/lib/fiddle.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 42183)
+++ ChangeLog	(revision 42184)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Jul 26 13:08:53 2013  Zachary Scott  <e@z...>
+
+	* ext/fiddle/lib/fiddle.rb: [DOC] Document Fiddle.dlopen(nil)
+	* ext/fiddle/handle.c: [DOC] Document Fiddle::Handle.new(nil)
+
 Fri Jul 26 13:04:15 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* load.c (rb_load_internal): use rb_load_file_str() to keep path
Index: ext/fiddle/lib/fiddle.rb
===================================================================
--- ext/fiddle/lib/fiddle.rb	(revision 42183)
+++ ext/fiddle/lib/fiddle.rb	(revision 42184)
@@ -32,6 +32,11 @@ module Fiddle https://github.com/ruby/ruby/blob/trunk/ext/fiddle/lib/fiddle.rb#L32
   # Creates a new handler that opens +library+, and returns an instance of
   # Fiddle::Handle.
   #
+  # If +nil+ is given for the +library+, Fiddle::Handle::DEFAULT is used, which
+  # usually means +libc+.
+  #
+  #   libc = Fiddle.dlopen(nil)
+  #
   # See Fiddle::Handle.new for more.
   def dlopen library
     Fiddle::Handle.new library
Index: ext/fiddle/handle.c
===================================================================
--- ext/fiddle/handle.c	(revision 42183)
+++ ext/fiddle/handle.c	(revision 42184)
@@ -113,10 +113,15 @@ predefined_fiddle_handle(void *handle) https://github.com/ruby/ruby/blob/trunk/ext/fiddle/handle.c#L113
 
 /*
  * call-seq:
- *    new(lib = nil, flags = Fiddle::RTLD_LAZY | Fiddle::RTLD_GLOBAL)
+ *    new(library = nil, flags = Fiddle::RTLD_LAZY | Fiddle::RTLD_GLOBAL)
+ *
+ * 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+.
+ *
+ *	libc = Fiddle::Handle.new
  *
- * Create a new handler that opens library named +lib+ with +flags+.  If no
- * library is specified, RTLD_DEFAULT is used.
  */
 static VALUE
 rb_fiddle_handle_initialize(int argc, VALUE argv[], VALUE self)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]