diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2016-02-26 16:20:15 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2016-02-26 16:20:15 -0300 |
commit | 7777b412deb46d051967b699697d1d6e6286a7b6 (patch) | |
tree | d6af032d014eb42f7328d071934156a37050fbbc /ltm.h | |
parent | c3e9b14d24afe14b2fc59c83d134430be5568769 (diff) | |
download | lua-7777b412deb46d051967b699697d1d6e6286a7b6.tar.gz lua-7777b412deb46d051967b699697d1d6e6286a7b6.tar.bz2 lua-7777b412deb46d051967b699697d1d6e6286a7b6.zip |
When available, use metafield '__name' in error messages
Diffstat (limited to 'ltm.h')
-rw-r--r-- | ltm.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltm.h,v 2.20 2014/06/10 18:53:18 roberto Exp roberto $ | 2 | ** $Id: ltm.h,v 2.21 2014/10/25 11:50:46 roberto Exp roberto $ |
3 | ** Tag methods | 3 | ** Tag methods |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -51,11 +51,12 @@ typedef enum { | |||
51 | #define fasttm(l,et,e) gfasttm(G(l), et, e) | 51 | #define fasttm(l,et,e) gfasttm(G(l), et, e) |
52 | 52 | ||
53 | #define ttypename(x) luaT_typenames_[(x) + 1] | 53 | #define ttypename(x) luaT_typenames_[(x) + 1] |
54 | #define objtypename(x) ttypename(ttnov(x)) | ||
55 | 54 | ||
56 | LUAI_DDEC const char *const luaT_typenames_[LUA_TOTALTAGS]; | 55 | LUAI_DDEC const char *const luaT_typenames_[LUA_TOTALTAGS]; |
57 | 56 | ||
58 | 57 | ||
58 | LUAI_FUNC const char *luaT_objtypename (lua_State *L, const TValue *o); | ||
59 | |||
59 | LUAI_FUNC const TValue *luaT_gettm (Table *events, TMS event, TString *ename); | 60 | LUAI_FUNC const TValue *luaT_gettm (Table *events, TMS event, TString *ename); |
60 | LUAI_FUNC const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, | 61 | LUAI_FUNC const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, |
61 | TMS event); | 62 | TMS event); |