diff options
| author | Alexander Gavrilov | 2012-04-20 13:30:37 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-04-20 13:30:37 +0400 |
| commit | 0a6982f4041f43d571bd2690f148ff369f2d8038 (patch) | |
| tree | 13d60514e341a3bafa36ffa7b8391d1eb5956e38 /library/LuaTypes.cpp | |
| parent | d95cc3435fe249e1c86e5af36b8a10e9009edd97 (diff) | |
| download | dfhack-0a6982f4041f43d571bd2690f148ff369f2d8038.tar.gz dfhack-0a6982f4041f43d571bd2690f148ff369f2d8038.tar.bz2 dfhack-0a6982f4041f43d571bd2690f148ff369f2d8038.tar.xz | |
Enable warnings correctly on linux and fix a lot of them.
Diffstat (limited to 'library/LuaTypes.cpp')
| -rw-r--r-- | library/LuaTypes.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/library/LuaTypes.cpp b/library/LuaTypes.cpp index 2cfe8a84..b4a4f5d4 100644 --- a/library/LuaTypes.cpp +++ b/library/LuaTypes.cpp @@ -577,35 +577,6 @@ static void write_field(lua_State *state, const struct_field_info *field, void * } /** - * Metamethod: represent a type node as string. - */ -static int meta_type_tostring(lua_State *state) -{ - if (!lua_getmetatable(state, 1)) - return 0; - - lua_getfield(state, -1, "__metatable"); - const char *cname = lua_tostring(state, -1); - - lua_pushstring(state, stl_sprintf("<type: %s>", cname).c_str()); - return 1; -} - -/** - * Metamethod: represent a DF object reference as string. - */ -static int meta_ptr_tostring(lua_State *state) -{ - uint8_t *ptr = get_object_addr(state, 1, 0, "access"); - - lua_getfield(state, UPVAL_METATABLE, "__metatable"); - const char *cname = lua_tostring(state, -1); - - lua_pushstring(state, stl_sprintf("<%s: 0x%08x>", cname, (unsigned)ptr).c_str()); - return 1; -} - -/** * Metamethod: __index for structures. */ static int meta_struct_index(lua_State *state) |
