summaryrefslogtreecommitdiff
path: root/ext/dl/cptr.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dl/cptr.c')
-rw-r--r--ext/dl/cptr.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/dl/cptr.c b/ext/dl/cptr.c
index 2f6a65fe520..89dcb942c02 100644
--- a/ext/dl/cptr.c
+++ b/ext/dl/cptr.c
@@ -640,6 +640,11 @@ Init_dlptr(void)
{
id_to_ptr = rb_intern("to_ptr");
+ /* Document-class: DL::CPtr
+ *
+ * CPtr is a class to handle C pointers
+ *
+ */
rb_cDLCPtr = rb_define_class_under(rb_mDL, "CPtr", rb_cObject);
rb_define_alloc_func(rb_cDLCPtr, rb_dlptr_s_allocate);
rb_define_singleton_method(rb_cDLCPtr, "malloc", rb_dlptr_s_malloc, -1);
@@ -669,5 +674,9 @@ Init_dlptr(void)
rb_define_method(rb_cDLCPtr, "size", rb_dlptr_size_get, 0);
rb_define_method(rb_cDLCPtr, "size=", rb_dlptr_size_set, 1);
+ /* Document-const: NULL
+ *
+ * A NULL pointer
+ */
rb_define_const(rb_mDL, "NULL", rb_dlptr_new(0, 0, 0));
}