summaryrefslogtreecommitdiff
path: root/ext/fiddle/handle.c
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-27 23:26:07 +0000
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-27 23:26:07 +0000
commit9c831edbf4f30fdcf90d8c991ded624c27898874 (patch)
tree65e7dc87ad5016d456ef5aa81ef80639e614eb6d /ext/fiddle/handle.c
parent7e4b6fa7d601a5a15b760e8bccd3f583ea89fef7 (diff)
* ext/fiddle/closure.c: Documentation for Fiddle
* ext/fiddle/pointer.c: ditto * ext/fiddle/function.c: ditto * ext/fiddle/lib/fiddle.rb: ditto * ext/fiddle/fiddle.c: ditto * ext/fiddle/handle.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/fiddle/handle.c')
-rw-r--r--ext/fiddle/handle.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/ext/fiddle/handle.c b/ext/fiddle/handle.c
index 346635f..832ff33 100644
--- a/ext/fiddle/handle.c
+++ b/ext/fiddle/handle.c
@@ -56,8 +56,9 @@ static const rb_data_type_t fiddle_handle_data_type = {
/*
* call-seq: close
*
- * Close this Fiddle::Handle. Calling close more than once will raise a
- * Fiddle::DLError exception.
+ * Close this handle.
+ *
+ * Calling close more than once will raise a Fiddle::DLError exception.
*/
static VALUE
rb_fiddle_handle_close(VALUE self)
@@ -112,7 +113,7 @@ predefined_fiddle_handle(void *handle)
/*
* call-seq:
- * initialize(lib = nil, flags = Fiddle::RTLD_LAZY | Fiddle::RTLD_GLOBAL)
+ * new(lib = nil, flags = Fiddle::RTLD_LAZY | Fiddle::RTLD_GLOBAL)
*
* Create a new handler that opens library named +lib+ with +flags+. If no
* library is specified, RTLD_DEFAULT is used.
@@ -194,7 +195,7 @@ rb_fiddle_handle_initialize(int argc, VALUE argv[], VALUE self)
/*
* call-seq: enable_close
*
- * Enable a call to dlclose() when this Fiddle::Handle is garbage collected.
+ * Enable a call to dlclose() when this handle is garbage collected.
*/
static VALUE
rb_fiddle_handle_enable_close(VALUE self)
@@ -209,7 +210,7 @@ rb_fiddle_handle_enable_close(VALUE self)
/*
* call-seq: disable_close
*
- * Disable a call to dlclose() when this Fiddle::Handle is garbage collected.
+ * Disable a call to dlclose() when this handle is garbage collected.
*/
static VALUE
rb_fiddle_handle_disable_close(VALUE self)
@@ -224,8 +225,9 @@ rb_fiddle_handle_disable_close(VALUE self)
/*
* call-seq: close_enabled?
*
- * Returns +true+ if dlclose() will be called when this Fiddle::Handle is
- * garbage collected.
+ * Returns +true+ if dlclose() will be called when this handle is garbage collected.
+ *
+ * See man(3) dlclose() for more info.
*/
static VALUE
rb_fiddle_handle_close_enabled_p(VALUE self)
@@ -256,7 +258,6 @@ static VALUE fiddle_handle_sym(void *handle, const char *symbol);
/*
* Document-method: sym
- * Document-method: []
*
* call-seq: sym(name)
*
@@ -284,12 +285,13 @@ rb_fiddle_handle_sym(VALUE self, VALUE sym)
/*
* Document-method: sym
- * Document-method: []
*
* call-seq: sym(name)
*
* Get the address as an Integer for the function named +name+. The function
- * is searched via dlsym on RTLD_NEXT. See man(3) dlsym() for more info.
+ * is searched via dlsym on RTLD_NEXT.
+ *
+ * See man(3) dlsym() for more info.
*/
static VALUE
rb_fiddle_handle_s_sym(VALUE self, VALUE sym)
@@ -386,6 +388,8 @@ Init_fiddle_handle(void)
* @handle = Fiddle::Handle.new(libc_so, Fiddle::RTLD_LAZY | Fiddle::RTLD_GLOBAL)
* => #<Fiddle::Handle:0x00000000d69ef8>
*
+ * See RTLD_LAZY and RTLD_GLOBAL
+ *
* === Addresses to symbols
*
* strcpy_addr = @handle['strcpy']
@@ -447,8 +451,8 @@ Init_fiddle_handle(void)
*
* If this value is specified or the environment variable LD_BIND_NOW is
* set to a nonempty string, all undefined symbols in the library are
- * resolved before dlopen() returns. If this cannot be done an error is
- * returned.
+ * resolved before Fiddle.dlopen returns. If this cannot be done an error
+ * is returned.
*/
rb_define_const(rb_cHandle, "RTLD_NOW", INT2NUM(RTLD_NOW));