aboutsummaryrefslogtreecommitdiff
path: root/lfunc.h
diff options
context:
space:
mode:
Diffstat (limited to 'lfunc.h')
-rw-r--r--lfunc.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/lfunc.h b/lfunc.h
index dbda3fdf..74a9fc2e 100644
--- a/lfunc.h
+++ b/lfunc.h
@@ -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 */