1994-07-19 14:24:17 -07:00
|
|
|
/*
|
|
|
|
** tree.h
|
|
|
|
** TecCGraf - PUC-Rio
|
1996-02-12 10:32:40 -08:00
|
|
|
** $Id: tree.h,v 1.11 1996/01/26 18:03:19 roberto Exp roberto $
|
1994-07-19 14:24:17 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef tree_h
|
|
|
|
#define tree_h
|
|
|
|
|
1994-12-20 13:20:36 -08:00
|
|
|
#include "types.h"
|
1994-07-19 14:24:17 -07:00
|
|
|
|
1994-11-23 06:32:00 -08:00
|
|
|
#define NOT_USED 0xFFFE
|
1994-07-19 14:24:17 -07:00
|
|
|
|
|
|
|
|
1994-11-23 06:32:00 -08:00
|
|
|
typedef struct TaggedString
|
|
|
|
{
|
1996-02-12 10:32:40 -08:00
|
|
|
unsigned short varindex; /* != NOT_USED if this is a symbol */
|
|
|
|
unsigned short constindex; /* != NOT_USED if this is a constant */
|
1994-11-25 11:27:03 -08:00
|
|
|
unsigned long hash; /* 0 if not initialized */
|
1996-02-12 10:32:40 -08:00
|
|
|
char marked; /* for garbage collection; 2 means "never collect" */
|
1994-11-23 06:32:00 -08:00
|
|
|
char str[1]; /* \0 byte already reserved */
|
|
|
|
} TaggedString;
|
1994-11-14 13:40:14 -08:00
|
|
|
|
|
|
|
|
1994-11-23 06:32:00 -08:00
|
|
|
TaggedString *lua_createstring (char *str);
|
1996-02-12 10:32:40 -08:00
|
|
|
TaggedString *luaI_createfixedstring (char *str);
|
1995-01-12 06:19:04 -08:00
|
|
|
Long lua_strcollector (void);
|
1994-07-19 14:24:17 -07:00
|
|
|
|
|
|
|
#endif
|