The equality test operator now is denoted by ==
,
instead of =
.
The syntax for table construction has been greatly simplified.
The old @(size)
has been substituted by {}
.
The list constructor (formerly @[...]
) and the record
constructor (formerly @{...}
) now are both coded like
{...}
.
When the construction involves a function call,
like in @func{...}
,
the new syntax does not use the @
.
More important, a construction function must now
explicitly return the constructed table.
The function lua_call
no longer has the parameter nparam
.
The function lua_pop
is no longer available,
since it could lead to strange behavior.
In particular,
to access results returned from a Lua function,
the new macro lua_getresult
should be used.
The old functions lua_storefield
and lua_storeindexed
have been replaced by
int lua_storesubscript (void);
with the parameters explicitly pushed on the stack.
The functionality of the function lua_errorfunction
has been
replaced by the fallback mechanism; see Section 4.8.
When calling a function from the Lua library,
parameters passed through the stack
must be pushed just before the correspondent call,
with no intermediate calls to Lua.
Special care should be taken with macros like
lua_getindexed
and lua_getfield
.