Skip Livingston <[EMAIL PROTECTED]> wrote: > IMCC uses atof() because it doesn't use (need?) any of the encoding > stuff.
Well imcc used to be a standalone language compiler that converted PIR to PASM, which got then assembled to bytecode by assembler.pl. Now imcc is fully integrated, parrot is the evolution of the imcc executable and parrot has two assemblers (or compiler) inside. *But* there is still a lot of code inside imcc, which needs adaption. Imcc didn't use any of Parrot's internals except the necessary things to generate the bytecode. > ...(See add_const_num() in imcc/pbc.c). Packing the cstring up > in a STRING then calling string_to_num() *fixes* the problem, Done that now too, similar to your patch. > ... but it > doesn't address the issue Larry brought up. The interpreter makes > heavy use of the encoding sensitive STRING type, the compiler does > not. Imcc or the lexer has no syntax yet to even read an Unicode string. It's just reading bytes and converts everything to C-strings. That needs of course fixing. > I'm not very familiar with the garbage collector, would the call to > string_make() be a memory leak? Or will it be collected? I used string_from_cstring(), the memory gets collected automatically. leo