func.h 716 B

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