On Thu, Jul 3, 2008 at 11:12 PM, Allison Randal via RT
<[EMAIL PROTECTED]> wrote:
> A bit more detail on the conversion process for a PMC:
(snip)
> 3) Change 'init' and 'init_pmc' to initialize the auto-generated struct
> instead of whatever initialization it was doing before. For example, if
> it was previously setting a default value in PMC_int_val, it now needs
> to allocate a struct of the appropriate type (the autogenerated structe
> is always named Parrot_<PMCname>, so the Exporter PMC has a struct named
> Parrot_Exporter), store that struct in PMC_data, and then set default
> values on the struct. See src/pmc/exporter.pmc for a good example of
> 'init'.

There is a problem with the autogenerated name: in several cases there
are other things with that name. For example, for the float.pmc we
have the Parrot_Float type defined in include/parrot/config.h

Given that the name will be mainly used via macros, a long and
meaningful name can be used, such as Parrot_PMCdata_<PMCname>

-- 
Salu2

Reply via email to