diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-05-13 16:20:40 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-05-13 16:20:40 -0300 |
| commit | 0b63d79b36790febd4c081bf8d6737df27529f8d (patch) | |
| tree | a59ac63d213b00fb0dcaaa65f6d24526c4f260f7 /ltests.c | |
| parent | 279c3a6961c60252f0368fdea889caf977f85fe0 (diff) | |
| download | lua-github-0b63d79b36790febd4c081bf8d6737df27529f8d.tar.gz | |
Details
- 'luaL_setfuncs' avoids creating closures for placeholders.
- Fixed some warnings about unused values in comma expressions.
- Comments.
Diffstat (limited to 'ltests.c')
| -rw-r--r-- | ltests.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -51,9 +51,8 @@ static int runC (lua_State *L, lua_State *L1, const char *pc); static void setnameval (lua_State *L, const char *name, int val) { - lua_pushstring(L, name); lua_pushinteger(L, val); - lua_settable(L, -3); + lua_setfield(L, -2, name); } @@ -710,12 +709,11 @@ static void printstack (lua_State *L) { static int get_limits (lua_State *L) { - lua_createtable(L, 0, 5); - setnameval(L, "BITS_INT", LUAI_BITSINT); + lua_createtable(L, 0, 6); + setnameval(L, "IS32INT", LUAI_IS32INT); setnameval(L, "MAXARG_Ax", MAXARG_Ax); setnameval(L, "MAXARG_Bx", MAXARG_Bx); setnameval(L, "OFFSET_sBx", OFFSET_sBx); - setnameval(L, "BITS_INT", LUAI_BITSINT); setnameval(L, "LFPF", LFIELDS_PER_FLUSH); setnameval(L, "NUM_OPCODES", NUM_OPCODES); return 1; |
