diff options
Diffstat (limited to 'lstring.h')
-rw-r--r-- | lstring.h | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -26,12 +26,6 @@ | |||
26 | #define sizestrshr(l) \ | 26 | #define sizestrshr(l) \ |
27 | (offsetof(TString, contents) + ((l) + 1) * sizeof(char)) | 27 | (offsetof(TString, contents) + ((l) + 1) * sizeof(char)) |
28 | 28 | ||
29 | /* | ||
30 | ** Size of a long TString: Size of the header plus space for the string | ||
31 | ** itself (including final '\0'). | ||
32 | */ | ||
33 | #define sizestrlng(l) (sizeof(TString) + ((l) + 1) * sizeof(char)) | ||
34 | |||
35 | 29 | ||
36 | #define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \ | 30 | #define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \ |
37 | (sizeof(s)/sizeof(char))-1)) | 31 | (sizeof(s)/sizeof(char))-1)) |
@@ -60,6 +54,8 @@ LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, int nuvalue); | |||
60 | LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l); | 54 | LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l); |
61 | LUAI_FUNC TString *luaS_new (lua_State *L, const char *str); | 55 | LUAI_FUNC TString *luaS_new (lua_State *L, const char *str); |
62 | LUAI_FUNC TString *luaS_createlngstrobj (lua_State *L, size_t l); | 56 | LUAI_FUNC TString *luaS_createlngstrobj (lua_State *L, size_t l); |
63 | 57 | LUAI_FUNC TString *luaS_newextlstr (lua_State *L, | |
58 | const char *s, size_t len, lua_Alloc falloc, void *ud); | ||
59 | LUAI_FUNC size_t luaS_sizelngstr (size_t len, int kind); | ||
64 | 60 | ||
65 | #endif | 61 | #endif |