Nicholas~

I will try to answer what I can, based on my current experience making those array PMCs.


Nicholas Clark wrote:

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?


You are responsible for freeing it by setting the active destroy flag.
If it contains pointers that need to be chased, you are responsible for supplying a mark function and setting the custom mark flag.
Examples of both of these can be found in fixedstringarray.pmc and fixedpmcarray.pmc, whereas fixedfloatarray.pmc has an active destroy and no mark.
You access this through the PMC_data(...) macro, typically passing SELF.


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?


Not sure, I never used any of this.

A pointer to a parrot string

An integer

A floating point value


I know that you can access the integer via PMC_int_val(...) macro.

All of the array classes that I made just use the integer and the data pointer, but that is because they are really quite simple.

I think that's all my questioning for now :-)


Sorry I can't be more helpful.

Nicholas Clark


Matt



Reply via email to