tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] TCCState, tcc_state, and ch/file/tok


From: fabrice . bellard
Subject: Re: [Tinycc-devel] TCCState, tcc_state, and ch/file/tok
Date: Sat, 03 May 2003 14:23:43 +0200 (CEST)
User-agent: IMP/PHP IMAP webmail program 2.2.6

Quoting "Peter \"Firefly\" Lund" <address@hidden>:

> On Sat, 3 May 2003 address@hidden wrote:
> 
> > - CH_EOF is *never* explicitely stored in the buffers (if it is, then
> it is a
> 
> Of course not.
> 
> > bug), only CH_EOB, so there is no point in changing its value.
> Moreover, I
> 
> Not true.
> 
> CH_EOF must have a value that can never occur in the buffer, right?
> 
> If the buffer and the buffer pointers are changed to use char instead
> of
> unsigned char then CH_EOF must also change because -1 becomes a valid
> value in the buffers.

OK I understand your point. But I am strongly against char usage. It is far 
easier to use uint8_t in buffers. I reserve chars only for "C" string handling.

> > don't see special problems in adding multibyte chars in TCC.
> 
> Who needs them?

No one I hope, but it was just to say that it was possible to add them as TCC 
has some support for L"" strings and L'' chars.

> > - Multiple TCCState are useful to handle multiple compilation
> contexts. My goal
> 
> What is the usecase?

If you use libtcc for scripting, then you might want to have several 
compilation contexts at the same time. 

It is also cleaner to have an explicit context (in most software I have seen, 
people tend to add explicit contexts instead of suppressing them. On most RISC 
CPUs, using contexts leads to more efficient and smaller code).

Fabrice.




reply via email to

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