On Feb 4, 2008, at 1:21 AM, Andy Lester wrote:

        SymReg * r = _get_sym_typed(hsh, name, t);

        if (r) {
                free(name);
                return r;
        }


It's really saying "If I don't need a copy, then free what I assume is a copy", rather than "If I need a copy, I'll make one."

I'm working on reversing this RIGHT NOW. It also lets me const more stuff. :-)


I've committed code that right now leaks MORE than before, but the interface makes more sense: The calling functions must free the memory if necessary, and the mk_* functions now all str_dup() any args they want copies of.

xoa

--
Andy Lester => [EMAIL PROTECTED] => www.petdance.com => AIM:petdance




Reply via email to