diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2015-10-12 13:38:19 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2015-10-12 13:38:19 -0300 |
commit | 880f82d089832d27e22df3f26cfc6c508465a63a (patch) | |
tree | 410ca47959c2eae221a03b02f97cd6508d8cb20a /ltests.c | |
parent | 1a741157cb43021a90189a2c7019f9323aa6f101 (diff) | |
download | lua-880f82d089832d27e22df3f26cfc6c508465a63a.tar.gz lua-880f82d089832d27e22df3f26cfc6c508465a63a.tar.bz2 lua-880f82d089832d27e22df3f26cfc6c508465a63a.zip |
'*' as a number means stack size, so that "return *" returns
all values in the stack.
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 2.207 2015/07/01 17:47:12 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.208 2015/09/08 16:55:43 roberto Exp roberto $ |
3 | ** Internal Module for Debugging of the Lua Implementation | 3 | ** Internal Module for Debugging of the Lua Implementation |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -1001,6 +1001,11 @@ static int getnum_aux (lua_State *L, lua_State *L1, const char **pc) { | |||
1001 | (*pc)++; | 1001 | (*pc)++; |
1002 | return res; | 1002 | return res; |
1003 | } | 1003 | } |
1004 | else if (**pc == '*') { | ||
1005 | res = lua_gettop(L1); | ||
1006 | (*pc)++; | ||
1007 | return res; | ||
1008 | } | ||
1004 | else if (**pc == '-') { | 1009 | else if (**pc == '-') { |
1005 | sig = -1; | 1010 | sig = -1; |
1006 | (*pc)++; | 1011 | (*pc)++; |