src/pmc/ptr.pmc - Pointer base type
Ptr is a bare bones PMC for representing pointers.
It is intended that additional functionality be added via subclassing.
Any functionality added to this PMC not critical to its operation as a pointer representation is deprecated in advance and subject to removal without notice.
Ptr can be implemented with two separate representations -
which makes use of the conventional PMC attributes structure and
thin which is more efficient and stores the pointer directly,
avoiding memory allocation and pointer dereference costs at the expense of extensibility.
The distinction is managed via a set of macros -
these use the
and this flag is therefore unavailable for subclass use.
fat and attributes have not yet been otherwise allocated,
will allocate room for the representation.
Unless otherwise initialized,
Parrot will have zeroed this and the pointer value will be
init with a value from an
init with a value from an existing pointer-ish PMC.
void set_pointer(void *ptr)
Get and set the pointer value.
Boolean value of the pointer.
NULL is true,
following in the C tradition.
Manage attribute deallocation for
Specifies length of the buffer.
In this case,
indicating undetermined length.
Create a string from the buffer, assumed to be a C string, with the encoding specified. If the encoding is omitted or null, use platform encoding.