func.h 713 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. ** $Id: func.h,v 1.11 1997/07/29 20:38:45 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. Byte *code;
  22. int lineDefined;
  23. TaggedString *fileName;
  24. struct TObject *consts;
  25. int nconsts;
  26. LocVar *locvars;
  27. } TFunc;
  28. TFunc *luaI_funccollector (long *cont);
  29. void luaI_funcfree (TFunc *l);
  30. void luaI_funcmark (TFunc *f);
  31. void luaI_initTFunc (TFunc *f);
  32. char *luaI_getlocalname (TFunc *func, int local_number, int line);
  33. #endif