aboutsummaryrefslogtreecommitdiff
path: root/lstring.h
diff options
context:
space:
mode:
Diffstat (limited to 'lstring.h')
-rw-r--r--lstring.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/lstring.h b/lstring.h
index dc3dc0e1..ec2972a1 100644
--- a/lstring.h
+++ b/lstring.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstring.h,v 1.38 2003/11/17 19:50:05 roberto Exp roberto $ 2** $Id: lstring.h,v 1.39 2004/08/24 20:12:06 roberto Exp roberto $
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*/
@@ -13,10 +13,9 @@
13#include "lstate.h" 13#include "lstate.h"
14 14
15 15
16#define sizestring(l) (cast(lu_mem, sizeof(union TString))+ \ 16#define sizestring(s) (sizeof(union TString)+((s)->len+1)*sizeof(char))
17 (cast(lu_mem, l)+1)*sizeof(char))
18 17
19#define sizeudata(l) (cast(lu_mem, sizeof(union Udata))+(l)) 18#define sizeudata(u) (sizeof(union Udata)+(u)->len)
20 19
21#define luaS_new(L, s) (luaS_newlstr(L, s, strlen(s))) 20#define luaS_new(L, s) (luaS_newlstr(L, s, strlen(s)))
22#define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \ 21#define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \