mirror of
https://github.com/lua/lua
synced 2026-09-29 04:35:58 +03:00
garbage collection tag for strings organized in struct TaggedString
This commit is contained in:
parent
ad0ec203f6
commit
d490555ec9
7 changed files with 57 additions and 54 deletions
8
opcode.h
8
opcode.h
|
|
@ -1,12 +1,13 @@
|
|||
/*
|
||||
** TeCGraf - PUC-Rio
|
||||
** $Id: opcode.h,v 3.7 1994/11/10 17:11:52 roberto Exp roberto $
|
||||
** $Id: opcode.h,v 3.8 1994/11/10 17:36:54 roberto Exp roberto $
|
||||
*/
|
||||
|
||||
#ifndef opcode_h
|
||||
#define opcode_h
|
||||
|
||||
#include "lua.h"
|
||||
#include "tree.h"
|
||||
|
||||
#ifndef STACKGAP
|
||||
#define STACKGAP 128
|
||||
|
|
@ -109,7 +110,7 @@ typedef union
|
|||
{
|
||||
Cfunction f;
|
||||
real n;
|
||||
char *s;
|
||||
TaggedString *ts;
|
||||
Byte *b;
|
||||
struct Hash *a;
|
||||
void *u;
|
||||
|
|
@ -129,7 +130,8 @@ typedef struct
|
|||
/* Macros to access structure members */
|
||||
#define tag(o) ((o)->tag)
|
||||
#define nvalue(o) ((o)->value.n)
|
||||
#define svalue(o) ((o)->value.s)
|
||||
#define svalue(o) ((o)->value.ts->str)
|
||||
#define tsvalue(o) ((o)->value.ts)
|
||||
#define bvalue(o) ((o)->value.b)
|
||||
#define avalue(o) ((o)->value.a)
|
||||
#define fvalue(o) ((o)->value.f)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue