>> *-21.patch does what you suggested above, some hidden awkwardness
>> but much less that the previous one.
>
> Yeah, I think this is much nicer, don't you agree?
Yep, I said "less awkwarness than previous", a pretty contrived way to say
better:-)
> However, this is still a bit broken -- you cannot return a stack
> variable from process_file, because the stack goes away once the
> function returns. You need to malloc it.
That is why the "fs" variable in process_file is declared "static", and
why I wrote "some hidden awkwarness".
I did want to avoid a malloc because then who would free the struct?
addScript cannot to it systematically because builtins are static. Or it
would have to create an on purpose struct, but I then that would be more
awkwarness, and malloc/free to pass arguments between functions is not
efficient nor very elegant.
So the "static" option looked like the simplest & most elegant version.
> Also, you forgot to update the comments in process_file,
> process_builtin, etc.
Indeed. v22 attached with better comments.
--
Fabien.