On Tuesday 08 July 2008 02:36:37 François PERRAD via RT wrote:

> This bug starts with r28354 (cache string).
> The cache don't handle empty string.
>
> Now, in Pipp (PHP), an empty string is used to stringify boolean False.
> // languages/pipp/src/pmc/phpboolean.pmc
>     STRING* get_string() {
>         if (PMC_int_val(SELF))
>             return const_string(INTERP, "1");
>         else
>             return const_string(INTERP, "");
>     }
>
> Instead of an empty string, I obtain another cached string like "MD2",
> "PhpUndef", ...

I can't reproduce that with this test case:

        .loadlib 'php_group'

        .sub 'main' :main
        .local pmc true, false

            true  = new 'PhpBoolean'
            false = new 'PhpBoolean'
            true  = 1
            false = 0
            $S0   = true
            say $S0
            $S0   = false
            say $S0
        .end

Do you have PIR which demonstrates it?

-- c

Reply via email to