1997-09-17 03:25:59 +08:00
|
|
|
/*
|
1999-10-12 00:13:42 +08:00
|
|
|
** $Id: lstring.h,v 1.9 1999/10/04 17:51:04 roberto Exp roberto $
|
1997-09-17 03:25:59 +08:00
|
|
|
** String table (keep all strings handled by Lua)
|
|
|
|
** See Copyright Notice in lua.h
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef lstring_h
|
|
|
|
#define lstring_h
|
|
|
|
|
|
|
|
|
|
|
|
#include "lobject.h"
|
|
|
|
|
1997-11-04 23:27:53 +08:00
|
|
|
|
1999-10-12 00:13:42 +08:00
|
|
|
#define NUM_HASHSTR 31 /* a prime not in array `dimensions' */
|
|
|
|
#define NUM_HASHUDATA 31 /* idem */
|
1999-10-05 01:51:04 +08:00
|
|
|
#define NUM_HASHS (NUM_HASHSTR+NUM_HASHUDATA)
|
|
|
|
|
|
|
|
|
1999-10-12 00:13:42 +08:00
|
|
|
/*
|
|
|
|
** any taggedstring with mark>=FIXMARK is never collected.
|
|
|
|
** Marks>=RESERVEDMARK are used to identify reserved words.
|
|
|
|
*/
|
|
|
|
#define FIXMARK 2
|
|
|
|
#define RESERVEDMARK 3
|
|
|
|
|
1999-10-05 01:51:04 +08:00
|
|
|
|
1997-11-04 23:27:53 +08:00
|
|
|
void luaS_init (void);
|
1997-09-17 03:25:59 +08:00
|
|
|
TaggedString *luaS_createudata (void *udata, int tag);
|
1999-10-05 01:51:04 +08:00
|
|
|
void luaS_freeall (void);
|
|
|
|
void luaS_free (TaggedString *ts);
|
1999-08-17 04:52:00 +08:00
|
|
|
TaggedString *luaS_newlstr (const char *str, long l);
|
|
|
|
TaggedString *luaS_new (const char *str);
|
|
|
|
TaggedString *luaS_newfixedstring (const char *str);
|
1999-10-05 01:51:04 +08:00
|
|
|
void luaS_rawsetglobal (TaggedString *ts, const TObject *newval);
|
1999-08-17 04:52:00 +08:00
|
|
|
int luaS_globaldefined (const char *name);
|
1997-12-02 04:31:25 +08:00
|
|
|
|
1997-09-17 03:25:59 +08:00
|
|
|
|
|
|
|
#endif
|