diff src/lua/ltm.h @ 11:27763b933818

raise lua sources up one level
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Mar 2012 11:07:39 -0600
parents src/lua/src/ltm.h@f9f4f1b99eed
children
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/lua/ltm.h	Sat Mar 03 11:07:39 2012 -0600
     1.3 @@ -0,0 +1,54 @@
     1.4 +/*
     1.5 +** $Id: ltm.h,v 2.6.1.1 2007/12/27 13:02:25 roberto Exp $
     1.6 +** Tag methods
     1.7 +** See Copyright Notice in lua.h
     1.8 +*/
     1.9 +
    1.10 +#ifndef ltm_h
    1.11 +#define ltm_h
    1.12 +
    1.13 +
    1.14 +#include "lobject.h"
    1.15 +
    1.16 +
    1.17 +/*
    1.18 +* WARNING: if you change the order of this enumeration,
    1.19 +* grep "ORDER TM"
    1.20 +*/
    1.21 +typedef enum {
    1.22 +  TM_INDEX,
    1.23 +  TM_NEWINDEX,
    1.24 +  TM_GC,
    1.25 +  TM_MODE,
    1.26 +  TM_EQ,  /* last tag method with `fast' access */
    1.27 +  TM_ADD,
    1.28 +  TM_SUB,
    1.29 +  TM_MUL,
    1.30 +  TM_DIV,
    1.31 +  TM_MOD,
    1.32 +  TM_POW,
    1.33 +  TM_UNM,
    1.34 +  TM_LEN,
    1.35 +  TM_LT,
    1.36 +  TM_LE,
    1.37 +  TM_CONCAT,
    1.38 +  TM_CALL,
    1.39 +  TM_N		/* number of elements in the enum */
    1.40 +} TMS;
    1.41 +
    1.42 +
    1.43 +
    1.44 +#define gfasttm(g,et,e) ((et) == NULL ? NULL : \
    1.45 +  ((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e]))
    1.46 +
    1.47 +#define fasttm(l,et,e)	gfasttm(G(l), et, e)
    1.48 +
    1.49 +LUAI_DATA const char *const luaT_typenames[];
    1.50 +
    1.51 +
    1.52 +LUAI_FUNC const TValue *luaT_gettm (Table *events, TMS event, TString *ename);
    1.53 +LUAI_FUNC const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o,
    1.54 +                                                       TMS event);
    1.55 +LUAI_FUNC void luaT_init (lua_State *L);
    1.56 +
    1.57 +#endif