mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-11-08 22:38:21 +01:00
Merge pull request #351 from jyoui/patch-1
This commit is contained in:
commit
b57ca9bfa3
@ -11,6 +11,8 @@ local string = require("string")
|
|||||||
local table = require("table")
|
local table = require("table")
|
||||||
local unpack = unpack or table.unpack
|
local unpack = unpack or table.unpack
|
||||||
local base = _G
|
local base = _G
|
||||||
|
local select = select
|
||||||
|
|
||||||
local _M = {}
|
local _M = {}
|
||||||
if module then -- heuristic for exporting a global package table
|
if module then -- heuristic for exporting a global package table
|
||||||
ltn12 = _M -- luacheck: ignore
|
ltn12 = _M -- luacheck: ignore
|
||||||
@ -22,8 +24,6 @@ _M.source = source
|
|||||||
_M.sink = sink
|
_M.sink = sink
|
||||||
_M.pump = pump
|
_M.pump = pump
|
||||||
|
|
||||||
local unpack = unpack or table.unpack
|
|
||||||
|
|
||||||
-- 2048 seems to be better in windows...
|
-- 2048 seems to be better in windows...
|
||||||
_M.BLOCKSIZE = 2048
|
_M.BLOCKSIZE = 2048
|
||||||
_M._VERSION = "LTN12 1.0.3"
|
_M._VERSION = "LTN12 1.0.3"
|
||||||
@ -45,7 +45,7 @@ end
|
|||||||
-- (thanks to Wim Couwenberg)
|
-- (thanks to Wim Couwenberg)
|
||||||
function filter.chain(...)
|
function filter.chain(...)
|
||||||
local arg = {...}
|
local arg = {...}
|
||||||
local n = base.select('#',...)
|
local n = select('#',...)
|
||||||
local top, index = 1, 1
|
local top, index = 1, 1
|
||||||
local retry = ""
|
local retry = ""
|
||||||
return function(chunk)
|
return function(chunk)
|
||||||
|
Loading…
Reference in New Issue
Block a user