diff options
Diffstat (limited to '')
| -rw-r--r-- | ltests.h | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltests.h,v 2.35 2014/07/18 13:27:45 roberto Exp roberto $ | 2 | ** $Id: ltests.h,v 2.36 2014/07/23 16:47:47 roberto Exp roberto $ |
| 3 | ** Internal Header for Debugging of the Lua Implementation | 3 | ** Internal Header for Debugging of the Lua Implementation |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -64,7 +64,8 @@ int lua_checkmemory (lua_State *L); | |||
| 64 | /* test for lock/unlock */ | 64 | /* test for lock/unlock */ |
| 65 | 65 | ||
| 66 | struct L_EXTRA { int lock; int *plock; }; | 66 | struct L_EXTRA { int lock; int *plock; }; |
| 67 | #define LUAI_EXTRASPACE sizeof(struct L_EXTRA) | 67 | /* extra space before a Lua state (+1 to make it unaligned) */ |
| 68 | #define LUAI_EXTRASPACE (sizeof(struct L_EXTRA) + 1) | ||
| 68 | #define getlock(l) (cast(struct L_EXTRA *, l) - 1) | 69 | #define getlock(l) (cast(struct L_EXTRA *, l) - 1) |
| 69 | #define luai_userstateopen(l) \ | 70 | #define luai_userstateopen(l) \ |
| 70 | (getlock(l)->lock = 0, getlock(l)->plock = &(getlock(l)->lock)) | 71 | (getlock(l)->lock = 0, getlock(l)->plock = &(getlock(l)->lock)) |
