From 0ee1162ad35b495774dc16ec6247dd4c20c70695 Mon Sep 17 00:00:00 2001 From: Pixel Date: Mon, 6 Oct 2008 21:16:14 -0700 Subject: Changing the way LoadLuaLib is generated, in order to be more compatible with other systems (msvc) --- lib/genloadlib.sh | 10 +++++++++- 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 #include -void LoadLuaLibs(Lua * L) { - #include "loadlualibs.ii" - -} -- cgit v1.2.3