Initial community commit

This commit is contained in:
Jef 2024-09-24 14:54:57 +02:00
parent 537bcbc862
commit fc06254474
16440 changed files with 4239995 additions and 2 deletions

View file

@ -0,0 +1,28 @@
#include "luashim.h"
static int example_test(lua_State* L)
{
lua_pushstring(L, "hello ");
lua_pushvalue(L, 1);
lua_concat(L, 2);
return 1;
}
static const luaL_Reg example_functions[] = {
{ "test", example_test },
{ NULL, NULL }
};
#ifdef _WIN32
__declspec(dllexport) int luaopen_example(lua_State *L)
#else
int luaopen_example(lua_State *L)
#endif
{
shimInitialize(L);
luaL_register(L, "example", example_functions);
return 0;
}

View file

@ -0,0 +1,28 @@
project "example"
language "C"
kind "SharedLib"
warnings "extra"
includedirs {
"../../contrib/lua/src",
"../../contrib/luashim"
}
links { 'luashim-lib' }
files
{
"*.c",
"*.lua"
}
filter "system:not windows"
targetprefix ""
targetextension ".so"
pic "on"
filter "configurations:Release"
targetdir "../../bin/release"
filter "configurations:Debug"
targetdir "../../bin/debug"