aboutsummaryrefslogtreecommitdiff
path: root/lstring.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-07-18 11:46:47 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-07-18 11:46:47 -0300
commitbb129031205acc64eb6b41c98d8a08c1fccce308 (patch)
tree65e01a5af21d2867c3108507ed0afbb8d32201bd /lstring.h
parentca41b43f53562e64abe433d6346d174c92548603 (diff)
downloadlua-bb129031205acc64eb6b41c98d8a08c1fccce308.tar.gz
lua-bb129031205acc64eb6b41c98d8a08c1fccce308.tar.bz2
lua-bb129031205acc64eb6b41c98d8a08c1fccce308.zip
type 'Udata' refers directly to structure inside the union (union
used only for aligning purposes now)
Diffstat (limited to 'lstring.h')
-rw-r--r--lstring.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lstring.h b/lstring.h
index f4f60a20..e515bf30 100644
--- a/lstring.h
+++ b/lstring.h
@@ -15,7 +15,8 @@
15#define sizelstring(l) (sizeof(union UTString) + ((l) + 1) * sizeof(char)) 15#define sizelstring(l) (sizeof(union UTString) + ((l) + 1) * sizeof(char))
16#define sizestring(s) sizelstring((s)->len) 16#define sizestring(s) sizelstring((s)->len)
17 17
18#define sizeudata(u) (sizeof(union Udata)+(u)->len) 18#define sizeludata(l) (sizeof(union UUdata) + (l))
19#define sizeudata(u) sizeludata((u)->len)
19 20
20#define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \ 21#define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \
21 (sizeof(s)/sizeof(char))-1)) 22 (sizeof(s)/sizeof(char))-1))