aboutsummaryrefslogtreecommitdiff
path: root/src/ltn12.lua
diff options
context:
space:
mode:
authorCaleb Maclennan <caleb@alerque.com>2022-03-24 18:11:07 +0300
committerCaleb Maclennan <caleb@alerque.com>2022-03-24 18:11:07 +0300
commit2de8ddfbb837a75b1cb5f09a656379c1e7cc589c (patch)
tree20b5f7b8a48d1c126763daca3860fcfb7c3b59a7 /src/ltn12.lua
parentf9e1d03f3c6c9fc59dd3b91716debc23aebf947f (diff)
parent5ed8b66e6d0c295f95fade159ada0f97f482b2ac (diff)
downloadluasocket-2de8ddfbb837a75b1cb5f09a656379c1e7cc589c.tar.gz
luasocket-2de8ddfbb837a75b1cb5f09a656379c1e7cc589c.tar.bz2
luasocket-2de8ddfbb837a75b1cb5f09a656379c1e7cc589c.zip
Merge remote-tracking branch 'upstream/master' into test-builds
Diffstat (limited to 'src/ltn12.lua')
-rw-r--r--src/ltn12.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ltn12.lua b/src/ltn12.lua
index f1e05e1..4cb17f5 100644
--- a/src/ltn12.lua
+++ b/src/ltn12.lua
@@ -11,6 +11,8 @@ local string = require("string")
11local table = require("table") 11local table = require("table")
12local unpack = unpack or table.unpack 12local unpack = unpack or table.unpack
13local base = _G 13local base = _G
14local select = select
15
14local _M = {} 16local _M = {}
15if module then -- heuristic for exporting a global package table 17if module then -- heuristic for exporting a global package table
16 ltn12 = _M -- luacheck: ignore 18 ltn12 = _M -- luacheck: ignore
@@ -22,8 +24,6 @@ _M.source = source
22_M.sink = sink 24_M.sink = sink
23_M.pump = pump 25_M.pump = pump
24 26
25local unpack = unpack or table.unpack
26
27-- 2048 seems to be better in windows... 27-- 2048 seems to be better in windows...
28_M.BLOCKSIZE = 2048 28_M.BLOCKSIZE = 2048
29_M._VERSION = "LTN12 1.0.3" 29_M._VERSION = "LTN12 1.0.3"
@@ -45,7 +45,7 @@ end
45-- (thanks to Wim Couwenberg) 45-- (thanks to Wim Couwenberg)
46function filter.chain(...) 46function filter.chain(...)
47 local arg = {...} 47 local arg = {...}
48 local n = base.select('#',...) 48 local n = select('#',...)
49 local top, index = 1, 1 49 local top, index = 1, 1
50 local retry = "" 50 local retry = ""
51 return function(chunk) 51 return function(chunk)