diff options
| -rw-r--r-- | ldo.h | 10 |
1 files changed, 3 insertions, 7 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldo.h,v 1.51 2002/08/07 14:35:55 roberto Exp roberto $ | 2 | ** $Id: ldo.h,v 1.52 2002/09/02 20:00:41 roberto Exp roberto $ |
| 3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -13,17 +13,13 @@ | |||
| 13 | #include "lzio.h" | 13 | #include "lzio.h" |
| 14 | 14 | ||
| 15 | 15 | ||
| 16 | /* | ||
| 17 | ** macro to increment stack top. | ||
| 18 | ** There must be always an empty slot at the L->stack.top | ||
| 19 | */ | ||
| 20 | #define incr_top(L) \ | ||
| 21 | {if (L->top >= L->stack_last) luaD_growstack(L, 1); L->top++;} | ||
| 22 | 16 | ||
| 23 | #define luaD_checkstack(L,n) \ | 17 | #define luaD_checkstack(L,n) \ |
| 24 | if ((char *)L->stack_last - (char *)L->top <= (n)*(int)sizeof(TObject)) \ | 18 | if ((char *)L->stack_last - (char *)L->top <= (n)*(int)sizeof(TObject)) \ |
| 25 | luaD_growstack(L, n) | 19 | luaD_growstack(L, n) |
| 26 | 20 | ||
| 21 | #define incr_top(L) {luaD_checkstack(L,1); L->top++;} | ||
| 22 | |||
| 27 | #define savestack(L,p) ((char *)(p) - (char *)L->stack) | 23 | #define savestack(L,p) ((char *)(p) - (char *)L->stack) |
| 28 | #define restorestack(L,n) ((TObject *)((char *)L->stack + (n))) | 24 | #define restorestack(L,n) ((TObject *)((char *)L->stack + (n))) |
| 29 | 25 | ||
