summaryrefslogtreecommitdiff
path: root/func.h
blob: 97185b9edf6fd903a77d68f6c978099868681054 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
** $Id: func.h,v 1.8 1996/03/14 15:54:20 roberto Exp roberto $
*/

#ifndef func_h
#define func_h

#include "types.h"
#include "lua.h"
#include "tree.h"

typedef struct LocVar
{
  TaggedString *varname;           /* NULL signals end of scope */
  int       line;
} LocVar;


/*
** Function Headers
*/
typedef struct TFunc
{
  struct TFunc	*next;
  int		marked;
  int		size;
  Byte		*code;
  int		lineDefined;
  char		*fileName;
  LocVar        *locvars;
} TFunc;

TFunc *luaI_funccollector (long *cont);
void luaI_funcfree (TFunc *l);
void luaI_insertfunction (TFunc *f);

void luaI_initTFunc (TFunc *f);
void luaI_freefunc (TFunc *f);

void luaI_registerlocalvar (TaggedString *varname, int line);
void luaI_unregisterlocalvar (int line);
void luaI_closelocalvars (TFunc *func);
char *luaI_getlocalname (TFunc *func, int local_number, int line);

#endif