On Tue, Oct 02, 2007 at 07:19:30AM -0700, jerry gay wrote:
> On 10/2/07, Klaas-Jan Stol <[EMAIL PROTECTED]> wrote:
> > On 10/2/07, Allison Randal <[EMAIL PROTECTED]> wrote:
> > the first file I wanted to fix, t/stm/runtime.t, contains this:
> >
> >     $I0 = find_type 'STMQueue'
> >     if $I0 goto done
> >     class = newclass 'STMQueue'
> >
> > a check is done if the check exists. in the new system, how should this
> > check be done?
> 
> i thought it would be:
>     $P0 = get_class ['STMQueue']
>     if $P0 goto done
>     class = newclass ['STMQueue']
> 
> but that fails with "Class 'STMQueue' doesn't exist"
> [...]
> since the pdd isn't clear on the return value from get_class when a
> class isn't found, i'll leave the decision to allison, but i'd prefer
> a PMCNULL be returned instead of an exception.

I agree, in which case the above would be ...

    $P0 = get_class 'STMQueue'     # or ['STMQueue']
    unless null $P0 goto done
    class = newclass 'STMQueue'    # or ['STMQueue']


(because "if $P0 goto done" will throw a Null PMC exception if 
get_class returns null).

Pm

Reply via email to