aboutsummaryrefslogtreecommitdiff
path: root/lstring.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-08-31 16:46:07 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-08-31 16:46:07 -0300
commite1d072571ec6f9d830e575a2ecdc95fd43428e53 (patch)
tree830fab7f2acb9adaee2d63073d339cc9557a5437 /lstring.h
parent7651a5c6b2ee6ec59cadec6199319d482071f176 (diff)
downloadlua-e1d072571ec6f9d830e575a2ecdc95fd43428e53.tar.gz
lua-e1d072571ec6f9d830e575a2ecdc95fd43428e53.tar.bz2
lua-e1d072571ec6f9d830e575a2ecdc95fd43428e53.zip
better syntax for type casts
Diffstat (limited to 'lstring.h')
-rw-r--r--lstring.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/lstring.h b/lstring.h
index 02cbc1ab..f8fb0b60 100644
--- a/lstring.h
+++ b/lstring.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstring.h,v 1.32 2001/06/06 18:00:19 roberto Exp roberto $ 2** $Id: lstring.h,v 1.33 2001/06/15 20:36:57 roberto Exp $
3** String table (keep all strings handled by Lua) 3** String table (keep all strings handled by Lua)
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -21,10 +21,10 @@
21#define RESERVEDMARK 3 21#define RESERVEDMARK 3
22 22
23 23
24#define sizestring(l) ((lu_mem)sizeof(union TString)+ \ 24#define sizestring(l) (cast(lu_mem, sizeof(union TString))+ \
25 ((lu_mem)(l)+1)*sizeof(l_char)) 25 (cast(lu_mem, l)+1)*sizeof(l_char))
26 26
27#define sizeudata(l) ((lu_mem)sizeof(union Udata)+(l)) 27#define sizeudata(l) (cast(lu_mem, sizeof(union Udata))+(l))
28 28
29#define luaS_new(L, s) (luaS_newlstr(L, s, strlen(s))) 29#define luaS_new(L, s) (luaS_newlstr(L, s, strlen(s)))
30#define luaS_newliteral(L, s) (luaS_newlstr(L, l_s("") s, \ 30#define luaS_newliteral(L, s) (luaS_newlstr(L, l_s("") s, \