diff options
| -rw-r--r-- | lfunc.h | 10 |
1 files changed, 5 insertions, 5 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lfunc.h,v 2.18 2017/06/29 15:06:44 roberto Exp roberto $ | 2 | ** $Id: lfunc.h,v 2.19 2018/01/28 15:13:26 roberto Exp roberto $ |
| 3 | ** Auxiliary functions to manipulate prototypes and closures | 3 | ** Auxiliary functions to manipulate prototypes and closures |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -11,11 +11,11 @@ | |||
| 11 | #include "lobject.h" | 11 | #include "lobject.h" |
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | #define sizeCclosure(n) (cast_int(sizeof(CClosure)) + \ | 14 | #define sizeCclosure(n) (cast_int(offsetof(CClosure, upvalue)) + \ |
| 15 | cast_int(sizeof(TValue)*((n)-1))) | 15 | cast_int(sizeof(TValue)) * (n)) |
| 16 | 16 | ||
| 17 | #define sizeLclosure(n) (cast_int(sizeof(LClosure)) + \ | 17 | #define sizeLclosure(n) (cast_int(offsetof(LClosure, upvals)) + \ |
| 18 | cast_int(sizeof(TValue *)*((n)-1))) | 18 | cast_int(sizeof(TValue *)) * (n)) |
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | /* test whether thread is in 'twups' list */ | 21 | /* test whether thread is in 'twups' list */ |
