1 /* see copyright notice in squirrel.h */
5 inline unsigned int _hashstr (const SQChar *s, size_t l)
7 unsigned int h = l; /* seed */
8 size_t step = (l>>5)|1; /* if string is too long, don't hash all its chars */
9 for (; l>=step; l-=step)
10 h = h ^ ((h<<5)+(h>>2)+(unsigned short)*(s++));
14 struct SQString : public SQRefCounted
19 static SQString *Create(SQSharedState *ss, const SQChar *, int len = -1 );
20 int Next(const SQObjectPtr &refpos, SQObjectPtr &outkey, SQObjectPtr &outval);
22 SQSharedState *_sharedstate;
23 SQString *_next; //chain for the string table