diff --git a/src/pointer.cr b/src/pointer.cr index bd19b66335b1..1eaf68120bbb 100644 --- a/src/pointer.cr +++ b/src/pointer.cr @@ -8,7 +8,7 @@ require "c/string" # to implement efficient data structures. For example, both `Array` and `Hash` are # implemented using pointers. # -# You can obtain pointers in four ways: `#new`, `#malloc`, `pointerof` and by calling a C +# You can obtain pointers in four ways: `#new`, `#malloc`, `pointerof`, or by calling a C # function that returns a pointer. # # `pointerof(x)`, where *x* is a variable or an instance variable, returns a pointer to @@ -21,6 +21,8 @@ require "c/string" # x # => 2 # ``` # +# Use `#value` to dereference the pointer. +# # Note that a pointer is *falsey* if it's null (if its address is zero). # # When calling a C function that expects a pointer you can also pass `nil` instead of using