diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-08-31 11:26:28 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-08-31 11:26:28 -0300 |
| commit | 4a714cebd1783fe6e5beafc2ce602df56a78723b (patch) | |
| tree | 542cd6c71ea3bb026c2de6fe63f50c4c327908f0 /lapi.h | |
| parent | 5b6be84106f41752624b9ee66dbd9d21eda7e0ce (diff) | |
| download | lua-4a714cebd1783fe6e5beafc2ce602df56a78723b.tar.gz lua-4a714cebd1783fe6e5beafc2ce602df56a78723b.tar.bz2 lua-4a714cebd1783fe6e5beafc2ce602df56a78723b.zip | |
API checks now have explanatory messages
Diffstat (limited to 'lapi.h')
| -rw-r--r-- | lapi.h | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lapi.h,v 2.4 2009/03/10 17:14:37 roberto Exp roberto $ | 2 | ** $Id: lapi.h,v 2.5 2009/04/03 15:58:03 roberto Exp roberto $ |
| 3 | ** Auxiliary functions from Lua API | 3 | ** Auxiliary functions from Lua API |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -11,7 +11,8 @@ | |||
| 11 | #include "llimits.h" | 11 | #include "llimits.h" |
| 12 | #include "lstate.h" | 12 | #include "lstate.h" |
| 13 | 13 | ||
| 14 | #define api_incr_top(L) {L->top++; api_check(L, L->top <= L->ci->top);} | 14 | #define api_incr_top(L) {L->top++; api_check(L, L->top <= L->ci->top, \ |
| 15 | "stack overflow");} | ||
| 15 | 16 | ||
| 16 | #define adjustresults(L,nres) \ | 17 | #define adjustresults(L,nres) \ |
| 17 | { if ((nres) == LUA_MULTRET && L->ci->top < L->top) L->ci->top = L->top; } | 18 | { if ((nres) == LUA_MULTRET && L->ci->top < L->top) L->ci->top = L->top; } |
