Marvin Humphrey wrote:

On Jan 8, 2007, at 10:26 AM, Nicholas Clark wrote:

Am I doing something wrong? Maybe because of refcounts and such?

Yes, I think so. (But I'm not the expert on these)

---->8 snip 8<----

    RETVAL = sv_2mortal(newRV_noinc((SV*)array));

/me .oO( wow, how often do you get to correct Dr. Clark? )

The OUTPUT: apparatus will mortalize RETVAL for you. Here's a snippet from a generated C file.

    RETVAL = newRV_noinc(target);
}
#line 1516 "lib/KinoSearch.c"
    ST(0) = RETVAL;
    sv_2mortal(ST(0));
    }
    XSRETURN(1);

So, you shouldn't mortalize RETVAL yourself.

Hmms. that means I should Ctrl+C my test and wait for any other correction. Or probably the error is somewhere else ;)

Thanks
Alberto
--
Alberto Simões - Departamento de Informática - Universidade do Minho
                 Campus de Gualtar - 4710-057 Braga - Portugal

"Beware of bugs in the above code;
 I have only proved it correct, not tried it."
                                   --- Donald Knuth

Reply via email to