aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-03-27 23:29:14 +1000
committerDavid Walter Seikel2014-03-27 23:29:14 +1000
commit8533027f70680a20f8e12a35a36bf71e5c98298d (patch)
treef4a130095aa2622214fe34c6923e227e22fe32aa
parentMake test_c a real Lua module, but just a test one doing it the usual way, no... (diff)
downloadSledjHamr-8533027f70680a20f8e12a35a36bf71e5c98298d.zip
SledjHamr-8533027f70680a20f8e12a35a36bf71e5c98298d.tar.gz
SledjHamr-8533027f70680a20f8e12a35a36bf71e5c98298d.tar.bz2
SledjHamr-8533027f70680a20f8e12a35a36bf71e5c98298d.tar.xz
Pointers to various URLs that might be useful.
-rw-r--r--ClientHamr/GuiLua/GuiLua.c3
-rw-r--r--ClientHamr/GuiLua/skang.lua1
-rw-r--r--ClientHamr/GuiLua/test_c.c11
3 files changed, 15 insertions, 0 deletions
diff --git a/ClientHamr/GuiLua/GuiLua.c b/ClientHamr/GuiLua/GuiLua.c
index d70061d..150f51f 100644
--- a/ClientHamr/GuiLua/GuiLua.c
+++ b/ClientHamr/GuiLua/GuiLua.c
@@ -77,6 +77,9 @@ The pre tokenized widget structure thingy I had planned in the
77matrix-RAD TODO just wont work, as it uses symbols. On the other hand, 77matrix-RAD TODO just wont work, as it uses symbols. On the other hand,
78we will be using Lua tables anyway. B-) 78we will be using Lua tables anyway. B-)
79 79
80The last half of http://passingcuriosity.com/2009/extending-lua-in-c/
81might be of use.
82
80*/ 83*/
81 84
82 85
diff --git a/ClientHamr/GuiLua/skang.lua b/ClientHamr/GuiLua/skang.lua
index 791f79b..565b642 100644
--- a/ClientHamr/GuiLua/skang.lua
+++ b/ClientHamr/GuiLua/skang.lua
@@ -143,6 +143,7 @@ end
143moduleEnd = function (module) 143moduleEnd = function (module)
144 -- TODO - Look for _NAME.properties, and load it into the modules Things. 144 -- TODO - Look for _NAME.properties, and load it into the modules Things.
145 -- TODO - Parse command line parameters at some point. 145 -- TODO - Parse command line parameters at some point.
146 -- http://stackoverflow.com/questions/3745047/help-locate-c-sample-code-to-read-lua-command-line-arguments
146 setfenv(2, module.savedEnvironment) 147 setfenv(2, module.savedEnvironment)
147end 148end
148 149
diff --git a/ClientHamr/GuiLua/test_c.c b/ClientHamr/GuiLua/test_c.c
index e7ee388..8d3ab81 100644
--- a/ClientHamr/GuiLua/test_c.c
+++ b/ClientHamr/GuiLua/test_c.c
@@ -1,5 +1,16 @@
1/* Should be a Lua skang module, roughly the same as test.lua 1/* Should be a Lua skang module, roughly the same as test.lua
2 2
3
4Seems to be several problems with linking in various OSes, heres some
5possibly helpful links -
6
7http://lua.2524044.n2.nabble.com/C-Lua-modules-not-compatible-with-every-Lua-interpreter-td7647522.html
8http://lua-users.org/wiki/LuaProxyDllFour
9http://stackoverflow.com/questions/11492194/how-do-you-create-a-lua-plugin-that-calls-the-c-lua-api?rq=1
10http://lua-users.org/lists/lua-l/2008-01/msg00671.html
11
12
13
3*/ 14*/
4 15
5 16