24 #if !defined(LUAI_HASHLIMIT)
25 #define LUAI_HASHLIMIT 5
45 return (a->
tsv.tt == b->
tsv.tt) &&
50 unsigned int luaS_hash (
const char *str,
size_t l,
unsigned int seed) {
51 unsigned int h = seed ^
cast(
unsigned int, l);
54 for (l1 = l; l1 >= step; l1 -= step)
55 h = h ^ ((h<<5) + (h>>2) +
cast_byte(str[l1 - 1]));
68 if (newsize > tb->
size) {
70 for (i = tb->
size; i < newsize; i++) tb->
hash[
i] = NULL;
73 for (i=0; i<tb->
size; i++) {
85 if (newsize < tb->
size) {
98 int tag,
unsigned int h,
GCObject **list) {
101 totalsize =
sizeof(
TString) + ((l + 1) *
sizeof(char));
106 memcpy(ts+1, str, l*
sizeof(
char));
107 ((
char *)(ts+1))[l] =
'\0';
142 (memcmp(str,
getstr(ts), l *
sizeof(
char)) == 0)) {
unsigned int luaS_hash(const char *str, size_t l, unsigned int seed)
GCObject * luaC_newobj(lua_State *L, int tt, size_t sz, GCObject **list, int offset)
unsigned LUA_INT32 lu_int32
TString * luaS_new(lua_State *L, const char *str)
void luaC_runtilstate(lua_State *L, int statesmask)
GLdouble GLdouble GLdouble b
#define luaM_reallocvector(L, v, oldn, n, t)
static TString * createstrobj(lua_State *L, const char *str, size_t l, int tag, unsigned int h, GCObject **list)
Udata * luaS_newudata(lua_State *L, size_t s, Table *e)
GLboolean GLboolean GLboolean GLboolean a
static TString * newshrstr(lua_State *L, const char *str, size_t l, unsigned int h)
int luaS_eqstr(TString *a, TString *b)
GLfloat GLfloat GLfloat GLfloat h
void luaS_resize(lua_State *L, int newsize)
static TString * internshrstr(lua_State *L, const char *str, size_t l)
TString * luaS_newlstr(lua_State *L, const char *str, size_t l)
l_noret luaM_toobig(lua_State *L)
int luaS_eqlngstr(TString *a, TString *b)