[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: 5.1 RTL macros
- From: "D Burgess" <dburgess@...>
- Date: Thu, 6 Apr 2006 10:26:52 +1000
David Jones wrote:
> So how do you suggest the two bits of Lua that use ungetc are changed
> so that they don't use ungetc?
in lauxlib.c
typedef struct LoadF {
int extraline;
+ int firstchar;
LUA_FILE f;
char buff[LUAL_BUFFERSIZE];
} LoadF;
in the getF function
+ if (lf->firstchar != (int)-1) {
+ lf->buff[0] = (char)lf->firstchar;
+ lf->firstchar = (int)-1;
+ *size=1;
+ return lf->buff;
+ }