diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-08-29 17:43:28 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-08-29 17:43:28 -0300 |
| commit | a97f29f15487c5f584185f646f9cfc06a04b26ca (patch) | |
| tree | e7ffd959fb80f9622d74a2efadfd7880037d64ca /lapi.c | |
| parent | 4135f4f5862b57d9dbf3e9b7c6507f5c86516327 (diff) | |
| download | lua-a97f29f15487c5f584185f646f9cfc06a04b26ca.tar.gz lua-a97f29f15487c5f584185f646f9cfc06a04b26ca.tar.bz2 lua-a97f29f15487c5f584185f646f9cfc06a04b26ca.zip | |
explicit stack control in the API
Diffstat (limited to 'lapi.c')
| -rw-r--r-- | lapi.c | 6 |
1 files changed, 5 insertions, 1 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lapi.c,v 1.88 2000/08/28 17:57:04 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.89 2000/08/29 14:52:27 roberto Exp roberto $ |
| 3 | ** Lua API | 3 | ** Lua API |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -45,6 +45,10 @@ void luaA_pushobject (lua_State *L, const TObject *o) { | |||
| 45 | incr_top; | 45 | incr_top; |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | int lua_stackspace (lua_State *L) { | ||
| 49 | return (L->stack_last - L->top); | ||
| 50 | } | ||
| 51 | |||
| 48 | 52 | ||
| 49 | 53 | ||
| 50 | /* | 54 | /* |
