diff options
-rw-r--r-- | ltests.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.h,v 2.32 2010/04/19 17:40:13 roberto Exp roberto $ | 2 | ** $Id: ltests.h,v 2.33 2010/07/28 15:51:59 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 | */ |
@@ -61,6 +61,8 @@ struct L_EXTRA { int lock; int *plock; }; | |||
61 | #define getlock(l) (cast(struct L_EXTRA *, l) - 1) | 61 | #define getlock(l) (cast(struct L_EXTRA *, l) - 1) |
62 | #define luai_userstateopen(l) \ | 62 | #define luai_userstateopen(l) \ |
63 | (getlock(l)->lock = 0, getlock(l)->plock = &(getlock(l)->lock)) | 63 | (getlock(l)->lock = 0, getlock(l)->plock = &(getlock(l)->lock)) |
64 | #define luai_userstateclose(l) \ | ||
65 | lua_assert(getlock(l)->lock == 1 && getlock(l)->plock == &(getlock(l)->lock)) | ||
64 | #define luai_userstatethread(l,l1) (getlock(l1)->plock = getlock(l)->plock) | 66 | #define luai_userstatethread(l,l1) (getlock(l1)->plock = getlock(l)->plock) |
65 | #define luai_userstatefree(l,l1) \ | 67 | #define luai_userstatefree(l,l1) \ |
66 | lua_assert(getlock(l)->plock == getlock(l1)->plock) | 68 | lua_assert(getlock(l)->plock == getlock(l1)->plock) |