mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 13:04:13 +02:00
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@25608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4b76900a55
commit
a9e662ac7a
2 changed files with 20 additions and 0 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue