From 9b6becb3120c3a47af90f2a4fa4783a8ee30ea57 Mon Sep 17 00:00:00 2001 From: Tim Duesterhus Date: Sat, 14 May 2022 22:15:28 +0200 Subject: [PATCH] CLEANUP: Remove unused function hlua_get_top_error_string This function has no prototype defined in a header and is not used in hlua.c either, thus it can be safely removed. Found with -Wmissing-prototypes. --- src/hlua.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/hlua.c b/src/hlua.c index ef967a515..abe3556b6 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -498,16 +498,6 @@ __LJMP unsigned int hlua_checktable(lua_State *L, int argno) return luaL_ref(L, LUA_REGISTRYINDEX); } -/* Return the string that is of the top of the stack. */ -const char *hlua_get_top_error_string(lua_State *L) -{ - if (lua_gettop(L) < 1) - return "unknown error"; - if (lua_type(L, -1) != LUA_TSTRING) - return "unknown error"; - return lua_tostring(L, -1); -} - __LJMP const char *hlua_traceback(lua_State *L, const char* sep) { lua_Debug ar;