diff --git a/CVRLua/Lua/LuaInterop.cs b/CVRLua/Lua/LuaInterop.cs index 872b7b0..dd85700 100644 --- a/CVRLua/Lua/LuaInterop.cs +++ b/CVRLua/Lua/LuaInterop.cs @@ -84,6 +84,9 @@ public struct lua_Debug [DllImport(ms_binaryName, CallingConvention = CallingConvention.Cdecl)] public static extern int luaopen_math(IntPtr L); + [DllImport(ms_binaryName, CallingConvention = CallingConvention.Cdecl)] + public static extern int luaopen_utf8(IntPtr L); + [DllImport(ms_binaryName, CallingConvention = CallingConvention.Cdecl)] public static extern void luaL_newmetatable(IntPtr L, string tname); @@ -216,12 +219,6 @@ public static int luaL_getmetatable(IntPtr L, string n) [DllImport(ms_binaryName, CallingConvention = CallingConvention.Cdecl)] public static extern int lua_setmetatable(IntPtr L, int objindex); - [DllImport(ms_binaryName, CallingConvention = CallingConvention.Cdecl)] - public static extern void lua_rawset(IntPtr L, int idx); - - [DllImport(ms_binaryName, CallingConvention = CallingConvention.Cdecl)] - public static extern void lua_copy(IntPtr L, int fromidx, int toidx); - [DllImport(ms_binaryName, CallingConvention = CallingConvention.Cdecl)] public static extern int lua_getstack(IntPtr L, int level, ref lua_Debug ar); @@ -250,18 +247,6 @@ public static void lua_remove(IntPtr L, int idx) lua_pop(L, 1); } - [DllImport(ms_binaryName, CallingConvention = CallingConvention.Cdecl)] - public static extern int lua_rawgetp(IntPtr L, int idx, IntPtr p); - - [DllImport(ms_binaryName, CallingConvention = CallingConvention.Cdecl)] - public static extern void lua_rawsetp(IntPtr L, int idx, IntPtr p); - - [DllImport(ms_binaryName, CallingConvention = CallingConvention.Cdecl)] - public static extern void lua_pushlightuserdata(IntPtr L, IntPtr p); - - [DllImport(ms_binaryName, CallingConvention = CallingConvention.Cdecl)] - public static extern int lua_rawget(IntPtr L, int idx); - [DllImport(ms_binaryName, CallingConvention = CallingConvention.Cdecl)] public static extern int lua_geti(IntPtr L, int idx, long n); diff --git a/CVRLua/Lua/LuaVM.cs b/CVRLua/Lua/LuaVM.cs index ec967f0..15aa823 100644 --- a/CVRLua/Lua/LuaVM.cs +++ b/CVRLua/Lua/LuaVM.cs @@ -40,6 +40,7 @@ internal LuaVM(string p_name = "") LuaInterop.luaL_requiref(m_state, "table", LuaInterop.luaopen_table, 1); LuaInterop.luaL_requiref(m_state, "string", LuaInterop.luaopen_string, 1); LuaInterop.luaL_requiref(m_state, "math", LuaInterop.luaopen_math, 1); + LuaInterop.luaL_requiref(m_state, "utf8", LuaInterop.luaopen_utf8, 1); m_objectsMap = new Dictionary();