diff options
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/genloadlib.sh | 10 | ||||
-rw-r--r-- | lib/loadlualibs.cc | 4 |
2 files changed, 9 insertions, 5 deletions
diff --git a/lib/genloadlib.sh b/lib/genloadlib.sh index f3b8259..c7231b1 100755 --- a/lib/genloadlib.sh +++ b/lib/genloadlib.sh @@ -1,13 +1,21 @@ #!/bin/sh +echo 'extern "C" {' ls *.lua | while read f ; do b=${f%%.*} echo "extern unsigned int size_$b;" echo "extern unsigned char $b[];" echo +done +echo '}' +echo +echo +echo 'void LoadLuaLibs(Lua * L) {' +ls *.lua | while read f ; do + b=${f%%.*} echo " Buffer ${b}_buff;" echo " ${b}_buff.write($b, size_$b);" echo " L->load(&${b}_buff);" echo - echo done +echo '}' diff --git a/lib/loadlualibs.cc b/lib/loadlualibs.cc index a100b74..ad5798c 100644 --- a/lib/loadlualibs.cc +++ b/lib/loadlualibs.cc @@ -20,8 +20,4 @@ #include <loadlualibs.h> #include <Buffer.h> -void LoadLuaLibs(Lua * L) { - #include "loadlualibs.ii" - -} |