func.h 700 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef func_h
  2. #define func_h
  3. #include "types.h"
  4. #include "lua.h"
  5. typedef struct LocVar
  6. {
  7. TaggedString *varname; /* NULL signals end of scope */
  8. int line;
  9. } LocVar;
  10. /*
  11. ** Function Headers
  12. */
  13. typedef struct TFunc
  14. {
  15. struct TFunc *next;
  16. char marked;
  17. int size;
  18. Byte *code;
  19. int lineDefined;
  20. char *fileName;
  21. LocVar *locvars;
  22. } TFunc;
  23. Long luaI_funccollector (void);
  24. void luaI_insertfunction (TFunc *f);
  25. void luaI_initTFunc (TFunc *f);
  26. void luaI_registerlocalvar (TaggedString *varname, int line);
  27. void luaI_unregisterlocalvar (int line);
  28. void luaI_closelocalvars (TFunc *func);
  29. char *luaI_getlocalname (TFunc *func, int local_number, int line);
  30. #endif