Changes due to new compat-5.1

This commit is contained in:
Diego Nehab 2004-12-23 22:32:12 +00:00
parent ae2d2859e7
commit 2f970d782e
11 changed files with 20 additions and 21 deletions

View File

@ -15,7 +15,7 @@ local socket = require("socket")
local url = require("socket.url")
local tp = require("socket.tp")
local dict = module("socket.dict")
module("socket.dict")
-----------------------------------------------------------------------------
-- Globals
@ -151,4 +151,4 @@ get = socket.protect(function(gett)
else return tget(gett) end
end)
base.setmetatable(dict, nil)
base.getmetatable(_M).__index = nil

View File

@ -14,7 +14,7 @@ local base = require("base")
local string = require("string")
local socket = require("socket")
local ltn12 = require("ltn12")
local lp = module("socket.lp")
module("socket.lp")
-- default port
PORT = 515
@ -318,4 +318,4 @@ query = socket.protect(function(p)
return data
end)
base.setmetatable(lp, nil)
base.getmetatable(_M).__index = nil

View File

@ -15,7 +15,7 @@ local string = require("string")
local socket = require("socket")
local ltn12 = require("ltn12")
local url = require("socket.url")
local tftp = module("socket.tftp")
module("socket.tftp")
-----------------------------------------------------------------------------
-- Program constants
@ -153,4 +153,4 @@ get = socket.protect(function(gett)
else return tget(gett) end
end)
base.setmetatable(tftp, nil)
base.getmetatable(_M).__index = nil

View File

@ -16,7 +16,7 @@ local socket = require("socket")
local url = require("socket.url")
local tp = require("socket.tp")
local ltn12 = require("ltn12")
local ftp = module("socket.ftp")
module("socket.ftp")
-----------------------------------------------------------------------------
-- Program constants
@ -278,4 +278,4 @@ get = socket.protect(function(gett)
else return tget(gett) end
end)
base.setmetatable(ftp, nil)
base.getmetatable(_M).__index = nil

View File

@ -15,7 +15,7 @@ local mime = require("mime")
local string = require("string")
local base = require("base")
local table = require("table")
local http = module("socket.http")
module("socket.http")
-----------------------------------------------------------------------------
-- Program constants
@ -259,4 +259,4 @@ request = socket.protect(function(reqt, body)
else return trequest(reqt) end
end)
base.setmetatable(http, nil)
base.getmetatable(_M).__index = nil

View File

@ -12,7 +12,7 @@ local string = require("string")
local table = require("table")
local base = require("base")
local coroutine = require("coroutine")
local ltn12 = module("ltn12")
module("ltn12")
filter = {}
source = {}
@ -276,4 +276,4 @@ function pump.all(src, snk, step)
end
end
base.setmetatable(ltn12, nil)
base.getmetatable(_M).__index = nil

View File

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

View File

@ -17,7 +17,7 @@ local socket = require("socket")
local tp = require("socket.tp")
local ltn12 = require("ltn12")
local mime = require("mime")
local smtp = module("socket.smtp")
module("socket.smtp")
-----------------------------------------------------------------------------
-- Program constants
@ -245,4 +245,4 @@ send = socket.protect(function(mailt)
return s:close()
end)
base.setmetatable(smtp, nil)
base.getmetatable(_M).__index = nil

View File

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

View File

@ -12,8 +12,7 @@ local base = require("base")
local string = require("string")
local socket = require("socket")
local ltn12 = require("ltn12")
local tp = module("socket.tp")
module("socket.tp")
-----------------------------------------------------------------------------
-- Program constants
@ -121,4 +120,4 @@ function connect(host, port, timeout)
return base.setmetatable({c = c}, metat)
end
base.setmetatable(tp, nil)
base.getmetatable(_M).__index

View File

@ -11,7 +11,7 @@
local string = require("string")
local base = require("base")
local table = require("table")
local url = module("socket.url")
module("socket.url")
-----------------------------------------------------------------------------
-- Encodes a string into its escaped hexadecimal representation
@ -273,4 +273,4 @@ function build_path(parsed, unsafe)
return path
end
base.setmetatable(url, nil)
base.getmetatable(_M).__index = nil