|
|
||
|
On Apr 06, 2006, at 01:26, D Burgess wrote:
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; + }
drj