Skip to content

Commit e1e3623

Browse files
committed
Made README more concise
1 parent 369861c commit e1e3623

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

README.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
11
# Lua.NET
22
![Logo](https://raw.githubusercontent.com/tilkinsc/Lua.NET/main/Lua.NET.Logo.png)
33

4-
C# .NET Core 7.0
4+
C# .NET Core 8.0
55
Lua.NET contains full bindings to Lua5.1.5, Lua5.2.4, Lua5.3.6, Lua.5.4.6 and LuaJIT
66

77
https://github.com/tilkinsc/Lua.NET
88
Copyright © Cody Tilkins 2023 MIT License
99

1010
Supports Lua5.4 Lua5.3 Lua5.2 Lua5.1 and LuaJIT
1111

12-
Hardcoded to only use doubles and 64-bit integers.
13-
This CAN be changed with manual edits, but it wasn't fun writing this library.
14-
This code was made with with the default includes on a 64-bit windows 10 machine using Lua's and LuaJIT's makefiles.
15-
No DLL has to be built for this library as its included for you.
16-
17-
Custom DLLs are supported as long as they don't change any call arguments or return values.
12+
Hardcoded to only use doubles and 64-bit integers.
13+
No DLL has to be built for this library as its included for you.
14+
Windows only. Linux is not supported, yet.
15+
Custom DLLs are supported when building from source; they must retain backwards compatibility with Lua.
1816

1917
# Design Considerations / Usage
2018

21-
Your delegates you pass to functions such as `lua_pushcfunction(...)` should be static.
22-
If you do not use static, then the lifetime of your functions should exceed the lifetime of the Lua the final Lua context you create during the course of the program.
23-
Do not use lambdas.
24-
C# is liable to GC your delegates otherwise.
19+
The delegates you pass to functions such as `lua_pushcfunction(...)` should be static.
20+
Otherwise, the lifetime of your functions should exceed the lifetime of the lua_State.
21+
Do not use lambdas, as C# is liable to GC them.
22+
A system to support lambdas may be added in the future, but it requires tracking lambda references.
2523

2624
# Examples
2725

@@ -51,7 +49,7 @@ public class Test1
5149
public static void Main(String[] args)
5250
{
5351
lua_State L = luaL_newstate();
54-
if (L.Handle == 0)
52+
if (L == 0)
5553
{
5654
Console.WriteLine("Unable to create context!");
5755
}
@@ -92,7 +90,7 @@ public class Test2
9290
public static void Main(String[] args)
9391
{
9492
lua_State L = luaL_newstate();
95-
if (L.Handle == 0)
93+
if (L == 0)
9694
{
9795
Console.WriteLine("Unable to create context!");
9896
}
@@ -168,7 +166,7 @@ public class Test4
168166
public static void Main(string[] args)
169167
{
170168
lua_State L = luaL_newstate();
171-
if (L.Handle == 0)
169+
if (L == 0)
172170
{
173171
Console.WriteLine("Unable to create context!");
174172
}

0 commit comments

Comments
 (0)