25#if !defined(LUAI_HASHLIMIT)
26#define LUAI_HASHLIMIT 5
34 size_t len =
a->tsv.len;
46 return (
a->tsv.tt == b->
tsv.tt) &&
51unsigned int luaS_hash (
const char *str,
size_t l,
unsigned int seed) {
52 unsigned int h = seed ^
cast(
unsigned int, l);
55 for (l1 = l; l1 >= step; l1 -= step)
56 h = h ^ ((h<<5) + (h>>2) +
cast_byte(str[l1 - 1]));
69 if (newsize > tb->
size) {
74 for (i=0; i<tb->
size; i++) {
79 unsigned int h =
lmod(
gco2ts(p)->hash, newsize);
86 if (newsize < tb->size) {
99 int tag,
unsigned int h,
GCObject **list) {
102 totalsize =
sizeof(
TString) + ((l + 1) *
sizeof(char));
107 memcpy(ts+1, str, l*
sizeof(
char));
108 ((
char *)(ts+1))[l] =
'\0';
143 (memcmp(str,
getstr(ts), l *
sizeof(
char)) == 0)) {
void * luaM_toobig(lua_State *L)
#define luaM_reallocvector(L, v, oldn, n, t)
GCObject * luaC_newobj(lua_State *L, int tt, size_t sz, GCObject **list, int offset)
void luaC_runtilstate(lua_State *L, int statesmask)
static TString * internshrstr(lua_State *L, const char *str, size_t l)
static TString * createstrobj(lua_State *L, const char *str, size_t l, int tag, unsigned int h, GCObject **list)
void luaS_resize(lua_State *L, int newsize)
int luaS_eqlngstr(TString *a, TString *b)
int luaS_eqstr(TString *a, TString *b)
unsigned int luaS_hash(const char *str, size_t l, unsigned int seed)
Udata * luaS_newudata(lua_State *L, size_t s, Table *e)
TString * luaS_newlstr(lua_State *L, const char *str, size_t l)
static TString * newshrstr(lua_State *L, const char *str, size_t l, unsigned int h)
CURL_EXTERN CURLMcode curl_socket_t s