lua-users home
lua-l archive

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


There appears to be a change in the way that structures are
declared.  Previously in Lua 3.1 alpha, for example, in lstate.h
it was:

typedef struct LState {
} LState;

LState *lua_state;

Now in lua 3.1, it's

struct lua_State {
};

extern lua_State *lua_state;

Under C++, this is OK, because it's OK to omit the "struct" before
declaring a variable or pointer of that structure type.  Under
ANSI C, however, the struct needs to be there.  This is causing
problems with gcc and VC++.  It seems that other structure references
are rewritten similarly.  Perhaps there is something going
on here about compilation I don't understand?

Daniel Marks
dmarks@uiuc.edu