diff options
author | Pierre Chapuis <catwell@archlinux.us> | 2013-01-23 19:13:32 +0100 |
---|---|---|
committer | Pierre Chapuis <catwell@archlinux.us> | 2013-01-23 19:13:32 +0100 |
commit | 33b4f0cfc7f0a0ebd5d4aaf9bbfe88a02d4368e7 (patch) | |
tree | c8a5d02130f4ceb93084a8d6d5d997195850b44f /etc | |
parent | eea1bc04d759e6a0e51c0b008828eaa372790cdb (diff) | |
download | luasocket-33b4f0cfc7f0a0ebd5d4aaf9bbfe88a02d4368e7.tar.gz luasocket-33b4f0cfc7f0a0ebd5d4aaf9bbfe88a02d4368e7.tar.bz2 luasocket-33b4f0cfc7f0a0ebd5d4aaf9bbfe88a02d4368e7.zip |
remove uses of arg in the codebase
Diffstat (limited to 'etc')
-rw-r--r-- | etc/dispatch.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/etc/dispatch.lua b/etc/dispatch.lua index cc8cb23..f35f358 100644 --- a/etc/dispatch.lua +++ b/etc/dispatch.lua | |||
@@ -50,7 +50,7 @@ function socket.protect(f) | |||
50 | return function(...) | 50 | return function(...) |
51 | local co = coroutine.create(f) | 51 | local co = coroutine.create(f) |
52 | while true do | 52 | while true do |
53 | local results = {coroutine.resume(co, base.unpack(arg))} | 53 | local results = {coroutine.resume(co, ...)} |
54 | local status = table.remove(results, 1) | 54 | local status = table.remove(results, 1) |
55 | if not status then | 55 | if not status then |
56 | if base.type(results[1]) == 'table' then | 56 | if base.type(results[1]) == 'table' then |
@@ -104,8 +104,7 @@ local function cowrap(dispatcher, tcp, error) | |||
104 | -- don't override explicitly. | 104 | -- don't override explicitly. |
105 | local metat = { __index = function(table, key) | 105 | local metat = { __index = function(table, key) |
106 | table[key] = function(...) | 106 | table[key] = function(...) |
107 | arg[1] = tcp | 107 | return tcp[key](tcp,select(2,...)) |
108 | return tcp[key](base.unpack(arg)) | ||
109 | end | 108 | end |
110 | return table[key] | 109 | return table[key] |
111 | end} | 110 | end} |