From 22840a3551d6564ea271d4be6ef7b539d4eba409 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Thu, 17 Jul 2025 17:04:08 +0200 Subject: Added embedding Lua --- c-embed-lua/notes.txt | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 c-embed-lua/notes.txt (limited to 'c-embed-lua/notes.txt') diff --git a/c-embed-lua/notes.txt b/c-embed-lua/notes.txt new file mode 100644 index 0000000..b458b4f --- /dev/null +++ b/c-embed-lua/notes.txt @@ -0,0 +1,7 @@ +You could make this byte array null terminated and use `luaL_dostring` but that +is probably not advisable. + + xxd -n hi -i hi.lua | sed 's/};/,\ 0\n};/' > hi.h + +Much better to use `luaL_loadbuffer` instead. +https://www.lua.org/manual/5.4/manual.html#luaL_loadbuffer -- cgit v1.2.3