Almost ready to release beta3

This commit is contained in:
Diego Nehab
2005-01-02 22:44:00 +00:00
parent a8254e94f8
commit 97b26e0b66
23 changed files with 53 additions and 59 deletions

View File

@ -278,4 +278,4 @@ get = socket.protect(function(gett)
else return tget(gett) end
end)
getmetatable(_M).__index = nil
--getmetatable(_M).__index = nil

View File

@ -259,4 +259,4 @@ request = socket.protect(function(reqt, body)
else return trequest(reqt) end
end)
getmetatable(_M).__index = nil
--getmetatable(_M).__index = nil

View File

@ -170,20 +170,16 @@ end
-- creates a source that produces contents of several sources, one after the
-- other, as if they were concatenated
-- (thanks to Wim Couwenberg)
function source.cat(...)
local co = coroutine.create(function()
local i = 1
while i <= table.getn(arg) do
local chunk, err = arg[i]()
if chunk then coroutine.yield(chunk)
elseif err then return nil, err
else i = i + 1 end
end
end)
local src = table.remove(arg, 1)
return function()
local ret, a, b = coroutine.resume(co)
if ret then return a, b
else return nil, a end
while src do
local chunk, err = src()
if chunk then return chunk end
if err then return nil, err end
src = table.remove(arg, 1)
end
end
end
@ -276,4 +272,4 @@ function pump.all(src, snk, step)
end
end
getmetatable(_M).__index = nil
--getmetatable(_M).__index = nil

View File

@ -13,7 +13,9 @@
/*-------------------------------------------------------------------------*\
* Current luasocket version
\*-------------------------------------------------------------------------*/
#define LUASOCKET_VERSION "LuaSocket 2.0 (beta3)"
#define LUASOCKET_VERSION "LuaSocket 2.0 (beta3)"
#define LUASOCKET_COPYRIGHT "Copyright (C) 2004-2005 Diego Nehab"
#define LUASOCKET_AUTHORS "Diego Nehab"
/*-------------------------------------------------------------------------*\
* This macro prefixes all exported API functions

View File

@ -85,4 +85,4 @@ function mime.stuff()
return ltn12.filter.cycle(dot, 2)
end
getmetatable(_M).__index = nil
--getmetatable(_M).__index = nil

View File

@ -245,4 +245,4 @@ send = socket.protect(function(mailt)
return s:close()
end)
getmetatable(_M).__index = nil
--getmetatable(_M).__index = nil

View File

@ -172,4 +172,4 @@ socket.sourcet["default"] = socket.sourcet["until-closed"]
socket.source = socket.choose(socket.sourcet)
getmetatable(_M).__index = nil
--getmetatable(_M).__index = nil

View File

@ -120,4 +120,4 @@ function connect(host, port, timeout)
return base.setmetatable({c = c}, metat)
end
getmetatable(_M).__index = nil
--getmetatable(_M).__index = nil

View File

@ -273,4 +273,4 @@ function build_path(parsed, unsafe)
return path
end
getmetatable(_M).__index = nil
--getmetatable(_M).__index = nil