summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-01 01:47:08 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-01 01:47:08 +0000
commit4515fc22893bbc3d7cc1e1b1dc3e92fc8adc3bdd (patch)
tree180b27b003760335f6a5176a031e5b9914a3e04f /ext
parent545dfac5d42d1b6951a5db2395bde5247741f568 (diff)
downloadruby-4515fc22893bbc3d7cc1e1b1dc3e92fc8adc3bdd.tar.gz
ruby-4515fc22893bbc3d7cc1e1b1dc3e92fc8adc3bdd.tar.xz
ruby-4515fc22893bbc3d7cc1e1b1dc3e92fc8adc3bdd.zip
* ext/dl/cptr.c (rb_dlptr_ptr, rb_dlptr_ref) adding documentation
* test/dl/test_cptr.rb (test_ref_ptr) testing CPtr#ref and CPtr#ptr git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/dl/cptr.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/dl/cptr.c b/ext/dl/cptr.c
index 555236f2a..466905f69 100644
--- a/ext/dl/cptr.c
+++ b/ext/dl/cptr.c
@@ -210,6 +210,12 @@ rb_dlptr_to_value(VALUE self)
return (VALUE)(data->ptr);
}
+/*
+ * call-seq: ptr
+ *
+ * Returns a DL::CPtr that is a dereferenced pointer for this DL::CPtr.
+ * Analogous to the star operator in C.
+ */
VALUE
rb_dlptr_ptr(VALUE self)
{
@@ -219,6 +225,12 @@ rb_dlptr_ptr(VALUE self)
return rb_dlptr_new(*((void**)(data->ptr)),0,0);
}
+/*
+ * call-seq: ref
+ *
+ * Returns a DL::CPtr that is a reference pointer for this DL::CPtr.
+ * Analogous to the ampersand operator in C.
+ */
VALUE
rb_dlptr_ref(VALUE self)
{