1994-11-07 18:20:56 +03:00
|
|
|
/*
|
1997-03-20 22:20:43 +03:00
|
|
|
** $Id: fallback.h,v 1.15 1997/03/19 19:41:10 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,
|
|
|
|
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;
|
|
|
|
|
|
|
|
#define IM_N 16
|
|
|
|
|
|
|
|
extern char *luaI_eventname[];
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* WARNING: if you change the order of this enumeration,
|
|
|
|
* grep "ORDER GIM"
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
GIM_ERROR = 0,
|
|
|
|
GIM_GETGLOBAL,
|
|
|
|
GIM_SETGLOBAL
|
|
|
|
} IMGS;
|
|
|
|
|
1997-03-19 22:41:10 +03:00
|
|
|
#define GIM_N 3
|
1994-11-10 20:11:52 +03:00
|
|
|
|
|
|
|
void luaI_setfallback (void);
|
1996-04-25 18:10:00 +04:00
|
|
|
int luaI_ref (Object *object, int lock);
|
|
|
|
Object *luaI_getref (int ref);
|
1995-10-17 14:52:38 +03:00
|
|
|
void luaI_travlock (int (*fn)(Object *));
|
1996-04-22 22:00:37 +04:00
|
|
|
void luaI_invalidaterefs (void);
|
1995-10-17 14:52:38 +03:00
|
|
|
char *luaI_travfallbacks (int (*fn)(Object *));
|
1994-11-07 18:20:56 +03:00
|
|
|
|
1997-03-20 22:20:43 +03:00
|
|
|
void luaI_type (void);
|
1997-02-26 20:38:41 +03:00
|
|
|
void luaI_settag (int tag, Object *o);
|
1997-03-19 22:41:10 +03:00
|
|
|
lua_Type luaI_typetag (int tag);
|
1997-03-20 22:20:43 +03:00
|
|
|
Object *luaI_getim (int tag, IMS event);
|
|
|
|
Object *luaI_getgim (IMGS event);
|
|
|
|
Object *luaI_getimbyObj (Object *o, IMS event);
|
1997-02-26 20:38:41 +03:00
|
|
|
int luaI_tag (Object *o);
|
|
|
|
void luaI_setintmethod (void);
|
1997-03-19 22:41:10 +03:00
|
|
|
void luaI_setglobalmethod (void);
|
|
|
|
void luaI_initfallbacks (void);
|
1997-02-26 20:38:41 +03:00
|
|
|
|
1994-11-07 18:20:56 +03:00
|
|
|
#endif
|
|
|
|
|