@@ -23,7 +23,7 @@ public struct lua_KContext
23
23
public static class Lua
24
24
{
25
25
26
- private const string DllName = "Lua544 .dll" ;
26
+ private const string DllName = "Lua546 .dll" ;
27
27
private const CallingConvention Convention = CallingConvention . Cdecl ;
28
28
29
29
[ StructLayout ( LayoutKind . Sequential , Pack = 1 , CharSet = CharSet . Ansi ) ]
@@ -72,6 +72,8 @@ public struct luaL_Buffer {
72
72
public delegate void lua_WarnFunction ( voidp ud , string msg , int tocont ) ;
73
73
public delegate void lua_Hook ( lua_State L , lua_Debug ar ) ;
74
74
75
+ public static unsafe luaL_Reg AsLuaLReg ( string name , delegate * unmanaged< lua_State , int > func ) => new luaL_Reg { name = name , func = ( nint ) func } ;
76
+
75
77
public const int LUAI_IS32INT = 1 ;
76
78
77
79
public const int LUA_INT_INT = 1 ;
@@ -120,14 +122,14 @@ public struct luaL_Buffer {
120
122
121
123
public const string LUA_VERSION_MAJOR = "5" ;
122
124
public const string LUA_VERSION_MINOR = "4" ;
123
- public const string LUA_VERSION_RELEASE = "4 " ;
125
+ public const string LUA_VERSION_RELEASE = "6 " ;
124
126
125
127
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 ;
127
129
128
130
public const string LUA_VERSION = "Lua " + LUA_VERSION_MAJOR + "." + LUA_VERSION_MINOR ;
129
131
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" ;
131
133
public const string LUA_AUTHORS = "R. Ierusalimschy, L. H. de Figueiredo, W. Celes" ;
132
134
133
135
public const string LUA_SIGNATURE = "\x1b Lua" ;
@@ -181,7 +183,10 @@ public static lua_State lua_newstate(lua_Alloc? f, voidp ud)
181
183
public static extern lua_State lua_newthread ( lua_State L ) ;
182
184
183
185
[ 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
185
190
186
191
[ DllImport ( DllName , CallingConvention = Convention , EntryPoint = "lua_atpanic" ) ]
187
192
public static extern charp _lua_atpanic ( lua_State L , charp panicf ) ;
0 commit comments