diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-02-20 13:52:50 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-02-20 13:52:50 -0300 |
commit | ca6fe7449a74efde6f959605dbe77acf3e64ca0b (patch) | |
tree | a6190e813ff712f7db750d4ecd3afd3ac9c0dbab /lstring.h | |
parent | 1afd5a152dc8b3a304236dc4e07bca38ea5eb53a (diff) | |
download | lua-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.h | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -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); | |||
47 | LUAI_FUNC void luaS_clearcache (global_State *g); | 44 | LUAI_FUNC void luaS_clearcache (global_State *g); |
48 | LUAI_FUNC void luaS_init (lua_State *L); | 45 | LUAI_FUNC void luaS_init (lua_State *L); |
49 | LUAI_FUNC void luaS_remove (lua_State *L, TString *ts); | 46 | LUAI_FUNC void luaS_remove (lua_State *L, TString *ts); |
50 | LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s); | 47 | LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, int nuvalue); |
51 | LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l); | 48 | LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l); |
52 | LUAI_FUNC TString *luaS_new (lua_State *L, const char *str); | 49 | LUAI_FUNC TString *luaS_new (lua_State *L, const char *str); |
53 | LUAI_FUNC TString *luaS_createlngstrobj (lua_State *L, size_t l); | 50 | LUAI_FUNC TString *luaS_createlngstrobj (lua_State *L, size_t l); |