summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2008-10-06 21:16:14 -0700
committerPixel <pixel@nobis-crew.org>2008-10-06 21:16:14 -0700
commit0ee1162ad35b495774dc16ec6247dd4c20c70695 (patch)
tree14355a6c6f46da7c51e3ef20f4b77bb15f98af57 /lib
parent6cb0b9f759733600e5879ea48cfdbf9f37f069ec (diff)
Changing the way LoadLuaLib is generated, in order to be more compatible with other systems (msvc)
Diffstat (limited to 'lib')
-rwxr-xr-xlib/genloadlib.sh10
-rw-r--r--lib/loadlualibs.cc4
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"
-
-}