[Resending to parrot-porters.]

On Tue, Oct 02, 2007 at 02:38:50PM -0700, [EMAIL PROTECTED] wrote:
> Log:
> [t] Fixed two more failing tests from ResizablePMCArray returning 
> PMCNULL, not Undef, for non-existent values.

I'm getting "Null PMC access" errors when retrieving strings and 
integers from uninitialized elements of ResizablePMCArray.

To be consistent with Hash and some of the other aggregates, the
set opcode should return PMC null _only_ when fetching a PMC from
an aggregate, if fetching a string or number it should return
the empty string or zero.

    $P0 = new 'ResizablePMCArray'

    $P1 = $P0[5]                   # $P1 is null
    $I1 = $P0[5]                   # $I1 is 0
    $S1 = $P0[5]                   # $S1 is ""

Here's the code that is currently failing for me:

    .sub main :main
        $P0 = new 'ResizablePMCArray'
    
        $I0 = $P0[0]
        print $I0
        print "\n"
    
        $S0 = $P0[0]
        say $S0
    .end

The expected output would be "0\n\n" -- i.e., a zero followed by two
newlines.

Thanks!

Pm

Reply via email to