aboutsummaryrefslogtreecommitdiff
path: root/lstring.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-02-20 13:52:50 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-02-20 13:52:50 -0300
commitca6fe7449a74efde6f959605dbe77acf3e64ca0b (patch)
treea6190e813ff712f7db750d4ecd3afd3ac9c0dbab /lstring.h
parent1afd5a152dc8b3a304236dc4e07bca38ea5eb53a (diff)
downloadlua-ca6fe7449a74efde6f959605dbe77acf3e64ca0b.tar.gz
lua-ca6fe7449a74efde6f959605dbe77acf3e64ca0b.tar.bz2
lua-ca6fe7449a74efde6f959605dbe77acf3e64ca0b.zip
userdata can have multiple user values
Diffstat (limited to 'lstring.h')
-rw-r--r--lstring.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/lstring.h b/lstring.h
index a994fe1e..2be5a3ff 100644
--- a/lstring.h
+++ b/lstring.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstring.h,v 1.62 2017/07/27 13:50:16 roberto Exp roberto $ 2** $Id: lstring.h,v 1.63 2017/11/23 19:29:04 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*/
@@ -21,9 +21,6 @@
21 21
22#define sizelstring(l) (sizeof(union UTString) + ((l) + 1) * sizeof(char)) 22#define sizelstring(l) (sizeof(union UTString) + ((l) + 1) * sizeof(char))
23 23
24#define sizeludata(l) (sizeof(union UUdata) + (l))
25#define sizeudata(u) sizeludata((u)->len)
26
27#define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \ 24#define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \
28 (sizeof(s)/sizeof(char))-1)) 25 (sizeof(s)/sizeof(char))-1))
29 26
@@ -47,7 +44,7 @@ LUAI_FUNC void luaS_resize (lua_State *L, int newsize);
47LUAI_FUNC void luaS_clearcache (global_State *g); 44LUAI_FUNC void luaS_clearcache (global_State *g);
48LUAI_FUNC void luaS_init (lua_State *L); 45LUAI_FUNC void luaS_init (lua_State *L);
49LUAI_FUNC void luaS_remove (lua_State *L, TString *ts); 46LUAI_FUNC void luaS_remove (lua_State *L, TString *ts);
50LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s); 47LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, int nuvalue);
51LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l); 48LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l);
52LUAI_FUNC TString *luaS_new (lua_State *L, const char *str); 49LUAI_FUNC TString *luaS_new (lua_State *L, const char *str);
53LUAI_FUNC TString *luaS_createlngstrobj (lua_State *L, size_t l); 50LUAI_FUNC TString *luaS_createlngstrobj (lua_State *L, size_t l);