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