From: "David Given": > grischka wrote: > [...] > > Well, I need to suggest something. So, maybe I'd move the bits in > > tcc_delete, that mess with globals, out from tcc_delete into another > > function. Then that function (name it "tcc_cleanup") can be called > > from tcc_new instead. How is this? > > Well, speaking as someone who deals with embedded stuff a fair bit, what > *I* would really like is for all the global data to get shunted off into > the TCCState structure and explicit globals not actually get used anywhere.
Not that we wouldn't really like this too. > This would allow multiple independent TCCStates: > > tcc1 = tcc_new() > tcc2 = tcc_new() > tcc_compile(tcc1, ...) > tcc_compile(tcc2, ...) > tcc_delete(tcc1) > tcc_delete(tcc2) > > This would make it considerably more useful IMO (as well as matching the > behaviour to what the API suggests). How difficult would it be? Difficult? Not at all. Just a big mess. Make dozens of functions take one more parameter, change hundreds of calls to them, and prefix hundreds of variable accesses with "s->". But go for it, we'll happily take it. I just wonder if there isn't some swiss-knife emacs around that can do that in 100 milliseconds ... --- grischka _______________________________________________ Tinycc-devel mailing list Tinycc-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/tinycc-devel