Skip to content

Commit b5e29eb

Browse files
authored
Merge pull request #14 from tilkinsc/dev
2 parents 3315796 + c375f53 commit b5e29eb

File tree

11 files changed

+13
-5
lines changed

11 files changed

+13
-5
lines changed

Lua.NET.csproj

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4+
<OutputType>Library</OutputType>
45
<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
56
<ImplicitUsings>enable</ImplicitUsings>
67
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@@ -29,11 +30,8 @@
2930
<None Include="LUA_COPYRIGHT" Pack="true" PackagePath="\" />
3031
<None Include="LUAJIT_COPYRIGHT" Pack="true" PackagePath="\" />
3132
<None Include="Lua.NET.Logo.png" Pack="true" PackagePath="\" />
32-
</ItemGroup>
33-
34-
<ItemGroup>
35-
<Content Include="native/win-x64/*" Pack="true" PackagePath="runtimes/win-x64/native" CopyToOutputDirectory="PreserveNewest" />
36-
<Content Include="native/linux-x64/*" Pack="true" PackagePath="runtimes/linux-x64/native" CopyToOutputDirectory="PreserveNewest" />
33+
<Content Include="runtimes/win-x64/native/*" Pack="true" PackagePath="runtimes/win-x64/native" CopyToOutputDirectory="PreserveNewest" />
34+
<Content Include="runtimes/linux-x64/native/*" Pack="true" PackagePath="runtimes/linux-x64/native" CopyToOutputDirectory="PreserveNewest" />
3735
</ItemGroup>
3836

3937
</Project>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/Lua51.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ public struct lua_State : IEquatable<lua_State>
1515

1616
public static bool operator !(lua_State state) => state.Handle == 0;
1717
public static bool operator ==(lua_State state1, lua_State state2) => state1.Handle == state2.Handle;
18+
public static bool operator ==(lua_State state1, int handle) => state1.Handle == (nuint) handle;
1819
public static bool operator !=(lua_State state1, lua_State state2) => state1.Handle != state2.Handle;
20+
public static bool operator !=(lua_State state1, int handle) => state1.Handle != (nuint) handle;
1921

2022
public readonly bool Equals(lua_State other) => Handle == other.Handle;
2123
public override readonly bool Equals(object? other) => other is lua_State state && Equals(state);

src/Lua52.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ public struct lua_State : IEquatable<lua_State>
1616

1717
public static bool operator !(lua_State state) => state.Handle == 0;
1818
public static bool operator ==(lua_State state1, lua_State state2) => state1.Handle == state2.Handle;
19+
public static bool operator ==(lua_State state1, int handle) => state1.Handle == (nuint) handle;
1920
public static bool operator !=(lua_State state1, lua_State state2) => state1.Handle != state2.Handle;
21+
public static bool operator !=(lua_State state1, int handle) => state1.Handle != (nuint) handle;
2022

2123
public readonly bool Equals(lua_State other) => Handle == other.Handle;
2224
public override readonly bool Equals(object? other) => other is lua_State state && Equals(state);

src/Lua53.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ public struct lua_State : IEquatable<lua_State>
1616

1717
public static bool operator !(lua_State state) => state.Handle == 0;
1818
public static bool operator ==(lua_State state1, lua_State state2) => state1.Handle == state2.Handle;
19+
public static bool operator ==(lua_State state1, int handle) => state1.Handle == (nuint) handle;
1920
public static bool operator !=(lua_State state1, lua_State state2) => state1.Handle != state2.Handle;
21+
public static bool operator !=(lua_State state1, int handle) => state1.Handle != (nuint) handle;
2022

2123
public readonly bool Equals(lua_State other) => Handle == other.Handle;
2224
public override readonly bool Equals(object? other) => other is lua_State state && Equals(state);

src/Lua54.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ public struct lua_State : IEquatable<lua_State>
1616

1717
public static bool operator !(lua_State state) => state.Handle == 0;
1818
public static bool operator ==(lua_State state1, lua_State state2) => state1.Handle == state2.Handle;
19+
public static bool operator ==(lua_State state1, int handle) => state1.Handle == (nuint) handle;
1920
public static bool operator !=(lua_State state1, lua_State state2) => state1.Handle != state2.Handle;
21+
public static bool operator !=(lua_State state1, int handle) => state1.Handle != (nuint) handle;
2022

2123
public readonly bool Equals(lua_State other) => Handle == other.Handle;
2224
public override readonly bool Equals(object? other) => other is lua_State state && Equals(state);

0 commit comments

Comments
 (0)