summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/mlua_utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirLua/src/mlua_utils.cpp')
-rw-r--r--plugins/MirLua/src/mlua_utils.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/MirLua/src/mlua_utils.cpp b/plugins/MirLua/src/mlua_utils.cpp
index 49078c9563..8b303f0188 100644
--- a/plugins/MirLua/src/mlua_utils.cpp
+++ b/plugins/MirLua/src/mlua_utils.cpp
@@ -170,6 +170,13 @@ int luaM_totable(lua_State *L)
return 1;
}
+int luaM_ptr2number(lua_State *L)
+{
+ luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+ lua_pushnumber(L, (intptr_t)lua_touserdata(L, 1));
+ return 1;
+}
+
void ObsoleteMethod(lua_State *L, const char *message)
{
lua_Debug info;