diff options
Diffstat (limited to 'src/lj_str.h')
-rw-r--r-- | src/lj_str.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lj_str.h b/src/lj_str.h index 2e9bfc1d..01c6ba6b 100644 --- a/src/lj_str.h +++ b/src/lj_str.h | |||
@@ -20,8 +20,12 @@ LJ_FUNC int lj_str_haspattern(GCstr *s); | |||
20 | LJ_FUNC void lj_str_resize(lua_State *L, MSize newmask); | 20 | LJ_FUNC void lj_str_resize(lua_State *L, MSize newmask); |
21 | LJ_FUNCA GCstr *lj_str_new(lua_State *L, const char *str, size_t len); | 21 | LJ_FUNCA GCstr *lj_str_new(lua_State *L, const char *str, size_t len); |
22 | LJ_FUNC void LJ_FASTCALL lj_str_free(global_State *g, GCstr *s); | 22 | LJ_FUNC void LJ_FASTCALL lj_str_free(global_State *g, GCstr *s); |
23 | LJ_FUNC void LJ_FASTCALL lj_str_init(lua_State *L); | ||
24 | #define lj_str_freetab(g) \ | ||
25 | (lj_mem_freevec(g, g->str.tab, g->str.mask+1, GCRef)) | ||
23 | 26 | ||
24 | #define lj_str_newz(L, s) (lj_str_new(L, s, strlen(s))) | 27 | #define lj_str_newz(L, s) (lj_str_new(L, s, strlen(s))) |
25 | #define lj_str_newlit(L, s) (lj_str_new(L, "" s, sizeof(s)-1)) | 28 | #define lj_str_newlit(L, s) (lj_str_new(L, "" s, sizeof(s)-1)) |
29 | #define lj_str_size(len) (sizeof(GCstr) + (((len)+4) & ~(MSize)3)) | ||
26 | 30 | ||
27 | #endif | 31 | #endif |