Okay, I've added some flags to pmc.h. They are:
PMC_active_destroy_FLAG = 2 << 8,
PMC_is_container_FLAG = 2 << 9,
PMC_is_buffer_ptr_FLAG = 2 << 10,
PMC_is_PMC_ptr_FLAG = 2 << 11,
PMC_private_GC_FLAG = 2 << 12
active_destroy must be set if the PMC needs to be actively destroyed. If
you don't set this, it won't be.
is_container must be set if the PMC is a container variable of some sort.
Hashes, arrays, lists, dictionaries, pairs, whatever. If the PMC holds or
can hold multiple PMCs then this should be set.
is_buffer_ptr must be set if the data pointer points to something that
looks like a buffer.
is_PMC_ptr must be set if the data pointer points to a PMC.
private_GC must be set if the PMC is essentially opaque to the GC.
The GC will, unless private_GC is set, assume it can snoop evilly into the
guts of the PMCs.
If the buffer the data pointer points to contains PMCs, set is_PMC_ptr,
is_buffer_ptr, and is_container. If the buffer the data points to contains
string pointers, set is_container and is_buffer_ptr.
I'll add in routines to allocate larger buffer structures in a bit. (These
are for things that need a buffer but have to tack things on the end) I'll
also add routines to mark PMCs and buffers as active for private GC (really
data marking) routines.
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk