Define timestruc_t for Lustre compatibility
[zfs.git] / module / lua / lstring.h
blob66e65379b8e78d81bb2b9436b436e5eb5ffa1126
1 /* BEGIN CSTYLED */
2 /*
3 ** $Id: lstring.h,v 1.49.1.1 2013/04/12 18:48:47 roberto Exp $
4 ** String table (keep all strings handled by Lua)
5 ** See Copyright Notice in lua.h
6 */
8 #ifndef lstring_h
9 #define lstring_h
11 #include "lgc.h"
12 #include "lobject.h"
13 #include "lstate.h"
16 #define sizestring(s) (sizeof(union TString)+((s)->len+1)*sizeof(char))
18 #define sizeudata(u) (sizeof(union Udata)+(u)->len)
20 #define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \
21 (sizeof(s)/sizeof(char))-1))
23 #define luaS_fix(s) l_setbit((s)->tsv.marked, FIXEDBIT)
27 ** test whether a string is a reserved word
29 #define isreserved(s) ((s)->tsv.tt == LUA_TSHRSTR && (s)->tsv.extra > 0)
33 ** equality for short strings, which are always internalized
35 #define eqshrstr(a,b) check_exp((a)->tsv.tt == LUA_TSHRSTR, (a) == (b))
38 LUAI_FUNC unsigned int luaS_hash (const char *str, size_t l, unsigned int seed);
39 LUAI_FUNC int luaS_eqlngstr (TString *a, TString *b);
40 LUAI_FUNC int luaS_eqstr (TString *a, TString *b);
41 LUAI_FUNC void luaS_resize (lua_State *L, int newsize);
42 LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e);
43 LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l);
44 LUAI_FUNC TString *luaS_new (lua_State *L, const char *str);
47 #endif
48 /* END CSTYLED */