summaryrefslogtreecommitdiff
path: root/lib/tasklib.lua
diff options
context:
space:
mode:
authorpixel <pixel>2007-05-27 13:35:28 +0000
committerpixel <pixel>2007-05-27 13:35:28 +0000
commitd90db46a553741dcf37a327b7992ac2c70e41362 (patch)
tree881029a7cda0b6392bf21b0ba32ec1ba6ddc8827 /lib/tasklib.lua
parent8cd6e24342a7cd209055eef42907ecc10843e466 (diff)
Improving a bit the lua support files.
Diffstat (limited to 'lib/tasklib.lua')
-rw-r--r--lib/tasklib.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/tasklib.lua b/lib/tasklib.lua
new file mode 100644
index 0000000..bfb6cca
--- /dev/null
+++ b/lib/tasklib.lua
@@ -0,0 +1,15 @@
+--
+-- Create some simple bindings for the LuaTask system to hide the various ugly yields.
+--
+
+function HttpClient(url)
+ return coroutine.yield("HttpClient", url))
+end
+
+function Command(command, ...)
+ return coroutine.yield("Command", command,
+ arg[ 1], arg[ 2], arg[ 3], arg[ 4], arg[ 5], arg[ 6], arg[ 7], arg[ 8],
+ arg[ 9], arg[10], arg[11], arg[12], arg[13], arg[14], arg[15], arg[16],
+ arg[17], arg[18], arg[19], arg[20], arg[21], arg[22], arg[23], arg[24],
+ arg[25], arg[26], arg[27], arg[28], arg[29], arg[30], arg[31], arg[32])
+end