1994-11-07 18:20:56 +03:00
|
|
|
/*
|
1997-04-03 03:04:12 +04:00
|
|
|
** $Id: fallback.h,v 1.20 1997/04/02 22:52:42 roberto Exp roberto $
|
1994-11-07 18:20:56 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef fallback_h
|
|
|
|
#define fallback_h
|
|
|
|
|
1996-04-22 22:00:37 +04:00
|
|
|
#include "lua.h"
|
1994-11-08 22:56:39 +03:00
|
|
|
#include "opcode.h"
|
|
|
|
|
1997-03-20 22:20:43 +03:00
|
|
|
/*
|
|
|
|
* WARNING: if you change the order of this enumeration,
|
|
|
|
* grep "ORDER IM"
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
IM_GETTABLE = 0,
|
|
|
|
IM_SETTABLE,
|
|
|
|
IM_INDEX,
|
1997-04-01 00:59:09 +04:00
|
|
|
IM_GETGLOBAL,
|
|
|
|
IM_SETGLOBAL,
|
1997-03-20 22:20:43 +03:00
|
|
|
IM_ADD,
|
|
|
|
IM_SUB,
|
|
|
|
IM_MUL,
|
|
|
|
IM_DIV,
|
|
|
|
IM_POW,
|
|
|
|
IM_UNM,
|
|
|
|
IM_LT,
|
|
|
|
IM_LE,
|
|
|
|
IM_GT,
|
|
|
|
IM_GE,
|
|
|
|
IM_CONCAT,
|
|
|
|
IM_GC,
|
|
|
|
IM_FUNCTION
|
|
|
|
} IMS;
|
|
|
|
|
1997-04-01 00:59:09 +04:00
|
|
|
#define IM_N 18
|
1997-03-20 22:20:43 +03:00
|
|
|
|
|
|
|
extern char *luaI_eventname[];
|
|
|
|
|
|
|
|
|
1994-11-10 20:11:52 +03:00
|
|
|
void luaI_setfallback (void);
|
1997-03-31 18:02:58 +04:00
|
|
|
int luaI_ref (TObject *object, int lock);
|
|
|
|
TObject *luaI_getref (int ref);
|
|
|
|
void luaI_travlock (int (*fn)(TObject *));
|
1996-04-22 22:00:37 +04:00
|
|
|
void luaI_invalidaterefs (void);
|
1997-03-31 18:02:58 +04:00
|
|
|
char *luaI_travfallbacks (int (*fn)(TObject *));
|
1994-11-07 18:20:56 +03:00
|
|
|
|
1997-03-31 18:02:58 +04:00
|
|
|
void luaI_settag (int tag, TObject *o);
|
1997-04-03 02:52:42 +04:00
|
|
|
int luaI_userdatatag (int tag);
|
1997-03-31 18:02:58 +04:00
|
|
|
TObject *luaI_getim (int tag, IMS event);
|
1997-03-24 20:13:22 +03:00
|
|
|
#define luaI_getimbyObj(o,e) (luaI_getim(luaI_tag(o),(e)))
|
1997-04-01 00:59:09 +04:00
|
|
|
TObject *luaI_geterrorim (void);
|
1997-03-31 18:02:58 +04:00
|
|
|
int luaI_tag (TObject *o);
|
1997-02-26 20:38:41 +03:00
|
|
|
void luaI_setintmethod (void);
|
1997-04-03 03:04:12 +04:00
|
|
|
void luaI_getintmethod (void);
|
1997-04-01 00:59:09 +04:00
|
|
|
void luaI_seterrormethod (void);
|
1997-03-19 22:41:10 +03:00
|
|
|
void luaI_initfallbacks (void);
|
1997-02-26 20:38:41 +03:00
|
|
|
|
1994-11-07 18:20:56 +03:00
|
|
|
#endif
|
|
|
|
|