logo       

Re: pmc_type: msg#00552

lang.perl.perl6.internals

Subject: Re: pmc_type

Nicholas Clark <nick@xxxxxxxx> wrote:
> pmc_type is documented and implemented as follows:

>=item C<INTVAL
> pmc_type(Parrot_Interp interp, STRING *name)>

> On IRC I asked:

> 17:44 <@Nicholas> can the type returned by Parrot_PMC_typenum for a PMC ever
> be
> zero?
> 17:45 <@Dan> I don't think so, no
> 17:46 <@Dan> Take that back -- a PMC of type 'default' can have a type of 0

C<enum_type_undef> aka 0 is returned for unknown types.


> 1: What does pmc_type return if it fails to find a PMC?

$I0 = find_type "no_such" # $I0 := 0

> 2: If that answer is 0, is it safe to document that 0 is a failure return,
> which happens to map to the PMC type for "default", but as they can't be
> instantiated looking up "default" is "not supported" (or words to that
> effect)

Yep, that's missing.

> Nicholas Clark

leo



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise