NAME
src/pmc/managedstruct.pmc - ManagedStruct PMC
DESCRIPTION
ManagedStruct
extends UnManagedStruct
to provide a class to hold C struct
values,
a memory-managed C struct,
that Parrot is responsible for disposing of.
Methods
void init()
Initializes an empty struct.
void init_pmc(PMC *value)
Initializes the struct with void destroy()
Destroys the struct,
freeing the allocated memory.If the "custom_free_func" attribute is set,
it is called to free the pointer.
Otherwise,
mem_gc_free() is used.
void set_integer_native(INTVAL value)
(Re)allocates PMC * clone()
Creates a clone of this PMC; clones any unmanaged memory it holds too.If the "custom_clone_func" attribute is set,
it is called to clone the PMC.
Otherwise,
a basic (shallow copy) clone is performed,
as there's no general way of knowing how to make a deep copy of the pointer contents.
*value
.
value
bytes for the struct.