Juergen Boemmels <[EMAIL PROTECTED]> wrote:
> Hi,

> I'm curently playing around with open calls returning a PMCNULL
> instead of a half valid IO-Object. But the main problem with that is
> that there is currently no way for the byte-code to detect such a
> case.

C<defined> tests for PMCNULL too and is usable.

> * A PMCNULL has false semantics. This may be done by letting
>   get_boolean return FALSE, or by adding a test to if_p_ic op:
>   if(!PMC_IS_NULL($1) && $1->vtable->get_boolean($1))

Or the null.pmc gets a valid get_bool() vtable slot returning 0.
OTOH when PMCNULL is a real NULL, this will fail then.

> * Have a special op for this if_null and unless_null which exlusively
>   test for NULL.

Probably better.

> boe

leo

Reply via email to