@@ -23,7 +23,7 @@ public struct lua_KContext
2323public static class Lua
2424{
2525
26- private const string DllName = "Lua544 .dll" ;
26+ private const string DllName = "Lua546 .dll" ;
2727 private const CallingConvention Convention = CallingConvention . Cdecl ;
2828
2929 [ StructLayout ( LayoutKind . Sequential , Pack = 1 , CharSet = CharSet . Ansi ) ]
@@ -72,6 +72,8 @@ public struct luaL_Buffer {
7272 public delegate void lua_WarnFunction ( voidp ud , string msg , int tocont ) ;
7373 public delegate void lua_Hook ( lua_State L , lua_Debug ar ) ;
7474
75+ public static unsafe luaL_Reg AsLuaLReg ( string name , delegate * unmanaged< lua_State , int > func ) => new luaL_Reg { name = name , func = ( nint ) func } ;
76+
7577 public const int LUAI_IS32INT = 1 ;
7678
7779 public const int LUA_INT_INT = 1 ;
@@ -120,14 +122,14 @@ public struct luaL_Buffer {
120122
121123 public const string LUA_VERSION_MAJOR = "5" ;
122124 public const string LUA_VERSION_MINOR = "4" ;
123- public const string LUA_VERSION_RELEASE = "4 " ;
125+ public const string LUA_VERSION_RELEASE = "6 " ;
124126
125127 public const int LUA_VERSION_NUM = 504 ;
126- public const int LUA_VERSION_RELEASE_NUM = LUA_VERSION_NUM * 100 + 4 ;
128+ public const int LUA_VERSION_RELEASE_NUM = LUA_VERSION_NUM * 100 + 6 ;
127129
128130 public const string LUA_VERSION = "Lua " + LUA_VERSION_MAJOR + "." + LUA_VERSION_MINOR ;
129131 public const string LUA_RELEASE = LUA_VERSION + "." + LUA_VERSION_RELEASE ;
130- public const string LUA_COPYRIGHT = LUA_RELEASE + " Copyright (C) 1994-2022 Lua.org, PUC-Rio" ;
132+ public const string LUA_COPYRIGHT = LUA_RELEASE + " Copyright (C) 1994-2023 Lua.org, PUC-Rio" ;
131133 public const string LUA_AUTHORS = "R. Ierusalimschy, L. H. de Figueiredo, W. Celes" ;
132134
133135 public const string LUA_SIGNATURE = "\x1b Lua" ;
@@ -181,7 +183,10 @@ public static lua_State lua_newstate(lua_Alloc? f, voidp ud)
181183 public static extern lua_State lua_newthread ( lua_State L ) ;
182184
183185 [ DllImport ( DllName , CallingConvention = Convention ) ]
184- public static extern int lua_resetthread ( lua_State L ) ;
186+ public static extern int lua_closethread ( lua_State L , lua_State from ) ;
187+
188+ [ DllImport ( DllName , CallingConvention = Convention ) ]
189+ public static extern int lua_resetthread ( lua_State L ) ; // deprecated
185190
186191 [ DllImport ( DllName , CallingConvention = Convention , EntryPoint = "lua_atpanic" ) ]
187192 public static extern charp _lua_atpanic ( lua_State L , charp panicf ) ;
0 commit comments