fallback.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. ** $Id: fallback.h,v 1.16 1997/03/20 19:20:43 roberto Exp roberto $
  3. */
  4. #ifndef fallback_h
  5. #define fallback_h
  6. #include "lua.h"
  7. #include "opcode.h"
  8. /*
  9. * WARNING: if you change the order of this enumeration,
  10. * grep "ORDER IM"
  11. */
  12. typedef enum {
  13. IM_GETTABLE = 0,
  14. IM_SETTABLE,
  15. IM_INDEX,
  16. IM_ADD,
  17. IM_SUB,
  18. IM_MUL,
  19. IM_DIV,
  20. IM_POW,
  21. IM_UNM,
  22. IM_LT,
  23. IM_LE,
  24. IM_GT,
  25. IM_GE,
  26. IM_CONCAT,
  27. IM_GC,
  28. IM_FUNCTION
  29. } IMS;
  30. #define IM_N 16
  31. extern char *luaI_eventname[];
  32. /*
  33. * WARNING: if you change the order of this enumeration,
  34. * grep "ORDER GIM"
  35. */
  36. typedef enum {
  37. GIM_ERROR = 0,
  38. GIM_GETGLOBAL,
  39. GIM_SETGLOBAL
  40. } IMGS;
  41. #define GIM_N 3
  42. void luaI_setfallback (void);
  43. int luaI_ref (Object *object, int lock);
  44. Object *luaI_getref (int ref);
  45. void luaI_travlock (int (*fn)(Object *));
  46. void luaI_invalidaterefs (void);
  47. char *luaI_travfallbacks (int (*fn)(Object *));
  48. void luaI_type (void);
  49. void luaI_settag (int tag, Object *o);
  50. lua_Type luaI_typetag (int tag);
  51. Object *luaI_getim (int tag, IMS event);
  52. #define luaI_getimbyObj(o,e) (luaI_getim(luaI_tag(o),(e)))
  53. Object *luaI_getgim (IMGS event);
  54. int luaI_tag (Object *o);
  55. void luaI_setintmethod (void);
  56. void luaI_setglobalmethod (void);
  57. void luaI_initfallbacks (void);
  58. #endif