tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] libtcc API v.s. global state v.s. tcc state


From: David Given
Subject: Re: [Tinycc-devel] libtcc API v.s. global state v.s. tcc state
Date: Sun, 20 Apr 2008 22:15:46 +0100
User-agent: Thunderbird 2.0.0.12 (X11/20080213)

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.

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?

-- 
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│ "I have always wished for my computer to be as easy to use as my
│ telephone; my wish has come true because I can no longer figure out
│ how to use my telephone." --- Bjarne Stroustrup

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]