tilkinsc / Lua.NET

[C# .NET Core 8.0] [Cross-Platform] Lua.NET contains full bindings to Lua5.1.5, Lua5.2.4, Lua5.3.6, Lua.5.4.6 and LuaJIT
MIT License
41 stars 4 forks source link

Change static readonly to const where available #3

Closed tilkinsc closed 2 years ago

tilkinsc commented 2 years ago

When attempting to do

int status = lua_pcall(L, 0, 0, 0);
switch (status)
{
    case LUA_ERRRUN:
        break;
}

LUA_ERRRUN is required to be a constant. Therefore, this is going to error out. There will be no downsides to converting a lot of variables from static to const.

tilkinsc commented 2 years ago

v1.3.0 a09be23 fixes #3