I'm trying to work out how to make PMCs. I'm not finding much documentation,
and I'm not sure what I'm missing. Particularly I'm trying to work out where
I'm allowed to store data, and what flags I might have to set
A basic PMC appears to contain
flags
of which 8 are private so I could use
a data pointer
which I can use. I am always responsible for freeing anything there(?)
and to do this I need to set the active destroy flag(?)
This flag is not the same as the high priority DOD system(?)
Does the garbage collector ever consider this pointer?
Does it ever chase what it points to?
a pobj_t union
which I can use.
Given that the nature of a C union means that the floating point value
occupies the same space as the pointer, do I need to set flags
depending on whether the pointers point to anything?
The pobj_t union contains one of:
A buffers structure
I'm not sure how to use this, but I'm not sure if I need to.
A pair of pointers
What's the difference between the _struct_val pointer and the
_pmc_val pointer? Is the PMC pointer only allowed to point to other
PMCs, while the other pointer is allowed to point to anything
non-PMC. If not, why are there two pointers? Does on PMC need two?
Does the garbage collector consider both pointers? Does it inspect
whatever they point to?
Do I need to set any flags, or do I just assign pointers to these?
When I'm done, do I need to be careful to assign NULL pointers to
ensure that the GC doesn't think I'm still interested in whatever
object I used to point to?
A pointer to a parrot string
An integer
A floating point value
I think that's all my questioning for now :-)
Nicholas Clark