[asterisk-commits] mnicholson: testsuite/asterisk/trunk r695 - /asterisk/trunk/asttest/lib/lua/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Aug 4 10:55:23 CDT 2010
Author: mnicholson
Date: Wed Aug 4 10:55:19 2010
New Revision: 695
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=695
Log:
Set __index = self for metatables globally instead of on each constructor call
Modified:
asterisk/trunk/asttest/lib/lua/astlib.lua
Modified: asterisk/trunk/asttest/lib/lua/astlib.lua
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/asttest/lib/lua/astlib.lua?view=diff&rev=695&r1=694&r2=695
==============================================================================
--- asterisk/trunk/asttest/lib/lua/astlib.lua (original)
+++ asterisk/trunk/asttest/lib/lua/astlib.lua Wed Aug 4 10:55:19 2010
@@ -344,12 +344,12 @@
end
asterisk_version = {}
+asterisk_version.__index = asterisk_version
function asterisk_version:new(version)
local v = {
version = version,
}
setmetatable(v, self)
- self.__index = self
v:_parse()
return v
@@ -562,6 +562,8 @@
manager = {
action = {}
}
+
+manager.__index = manager
function manager:new()
local m = {
events = {},
@@ -572,7 +574,6 @@
}
setmetatable(m, self)
- self.__index = self
return m
end
More information about the asterisk-commits
mailing list