diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-11-08 15:36:05 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-11-08 15:36:05 -0200 |
| commit | 39929384c631ba43c12958a7d7f0e0ec4723241f (patch) | |
| tree | f22d99b402115f14a191e3d4c9559586ca0952b1 | |
| parent | de7cf8e63abac49100f99e60782575f940252cfd (diff) | |
| download | lua-39929384c631ba43c12958a7d7f0e0ec4723241f.tar.gz lua-39929384c631ba43c12958a7d7f0e0ec4723241f.tar.bz2 lua-39929384c631ba43c12958a7d7f0e0ec4723241f.zip | |
new macro 'luai_userstateclose' (to test it is being called correctly)
Diffstat (limited to '')
| -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) |
