summaryrefslogtreecommitdiff
path: root/c-embed-lua/notes.txt
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2025-07-17 17:04:08 +0200
committerMitja Felicijan <mitja.felicijan@gmail.com>2025-07-17 17:04:08 +0200
commit22840a3551d6564ea271d4be6ef7b539d4eba409 (patch)
treeafc8b697bd5ea5aecd3617233a547db10a09c92e /c-embed-lua/notes.txt
parentfccba39aa0c0060e7e17c4075963bf8a428536b1 (diff)
downloadprobe-22840a3551d6564ea271d4be6ef7b539d4eba409.tar.gz
Added embedding Lua
Diffstat (limited to 'c-embed-lua/notes.txt')
-rw-r--r--c-embed-lua/notes.txt7
1 files changed, 7 insertions, 0 deletions
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