25#define MEMERRMSG "not enough memory"
32#if !defined(LUAI_HASHLIMIT)
33#define LUAI_HASHLIMIT 5
41 size_t len =
a->u.lnglen;
49unsigned int luaS_hash (
const char *str,
size_t l,
unsigned int seed) {
50 unsigned int h = seed ^
cast(
unsigned int, l);
52 for (; l >= step; l -= step)
53 h ^= ((h<<5) + (h>>2) +
cast_byte(str[l - 1]));
74 if (newsize > tb->
size) {
76 for (i = tb->
size; i < newsize; i++)
79 for (i = 0; i < tb->
size; i++) {
84 unsigned int h =
lmod(p->
hash, newsize);
90 if (newsize < tb->size) {
173 for (ts = *list; ts !=
NULL; ts = ts->
u.
hnext) {
175 (memcmp(str,
getstr(ts), l *
sizeof(
char)) == 0)) {
187 memcpy(
getstr(ts), str, l *
sizeof(
char));
207 memcpy(
getstr(ts), str, l *
sizeof(
char));
224 if (strcmp(str,
getstr(p[j])) == 0)
void * luaM_toobig(lua_State *L)
#define luaM_reallocvector(L, v, oldn, n, t)
#define luaS_newliteral(L, s)
GCObject * luaC_newobj(lua_State *L, int tt, size_t sz, GCObject **list, int offset)
void luaC_fix(lua_State *L, GCObject *o)
#define setuservalue(L, u, o)
void luaS_clearcache(global_State *g)
static TString * createstrobj(lua_State *L, size_t l, int tag, unsigned int h)
static TString * internshrstr(lua_State *L, const char *str, size_t l)
void luaS_remove(lua_State *L, TString *ts)
void luaS_resize(lua_State *L, int newsize)
int luaS_eqlngstr(TString *a, TString *b)
Udata * luaS_newudata(lua_State *L, size_t s)
void luaS_init(lua_State *L)
unsigned int luaS_hash(const char *str, size_t l, unsigned int seed)
unsigned int luaS_hashlongstr(TString *ts)
TString * luaS_newlstr(lua_State *L, const char *str, size_t l)
TString * luaS_createlngstrobj(lua_State *L, size_t l)
CURL_EXTERN CURLMcode curl_socket_t s
TString * strcache[STRCACHE_N][STRCACHE_M]