func.h 857 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. ** $Id: func.h,v 1.8 1996/03/14 15:54:20 roberto Exp roberto $
  3. */
  4. #ifndef func_h
  5. #define func_h
  6. #include "types.h"
  7. #include "lua.h"
  8. #include "tree.h"
  9. typedef struct LocVar
  10. {
  11. TaggedString *varname; /* NULL signals end of scope */
  12. int line;
  13. } LocVar;
  14. /*
  15. ** Function Headers
  16. */
  17. typedef struct TFunc
  18. {
  19. struct TFunc *next;
  20. int marked;
  21. int size;
  22. Byte *code;
  23. int lineDefined;
  24. char *fileName;
  25. LocVar *locvars;
  26. } TFunc;
  27. TFunc *luaI_funccollector (long *cont);
  28. void luaI_funcfree (TFunc *l);
  29. void luaI_insertfunction (TFunc *f);
  30. void luaI_initTFunc (TFunc *f);
  31. void luaI_freefunc (TFunc *f);
  32. void luaI_registerlocalvar (TaggedString *varname, int line);
  33. void luaI_unregisterlocalvar (int line);
  34. void luaI_closelocalvars (TFunc *func);
  35. char *luaI_getlocalname (TFunc *func, int local_number, int line);
  36. #endif