summaryrefslogtreecommitdiff
path: root/lstring.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-10-30 15:49:19 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-10-30 15:49:19 -0200
commitd1c689af402e847f77dbe164265e097e90bdc61a (patch)
tree15280b1d60381277d904049ced37b07ded8ad6ac /lstring.h
parent37e9c2e74486ed443151430a9b73a3844d3554ef (diff)
downloadlua-github-d1c689af402e847f77dbe164265e097e90bdc61a.tar.gz
subtelties in layout of TString
Diffstat (limited to 'lstring.h')
-rw-r--r--lstring.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/lstring.h b/lstring.h
index aa0157b5..b940fba6 100644
--- a/lstring.h
+++ b/lstring.h
@@ -1,5 +1,5 @@
/*
-** $Id: lstring.h,v 1.22 2000/09/29 12:42:13 roberto Exp roberto $
+** $Id: lstring.h,v 1.23 2000/10/26 12:47:05 roberto Exp roberto $
** String table (keep all strings handled by Lua)
** See Copyright Notice in lua.h
*/
@@ -20,7 +20,8 @@
#define RESERVEDMARK 3
-#define sizestring(l) (sizeof(TString)+(lint32)(l)*sizeof(char))
+#define sizestring(l) ((long)sizeof(TString) + \
+ ((long)(l+1)-TSPACK)*(long)sizeof(char))
void luaS_init (lua_State *L);