Fix: memory leak connected to lua 5.0 vaarargs

This commit is contained in:
Bluewhale1337
2026-07-26 15:47:37 +02:00
parent 1a100c4f0a
commit 1eb39c9969
19 changed files with 40 additions and 38 deletions
@@ -59,7 +59,7 @@ local function Update(self, event)
end
end
local function Path(self, ...)
local function Path(self, event, a, b, c, d, e)
--[[ Override: AssistantIndicator.Override(self, event, ...)
Used to completely override the element's update process.
@@ -67,7 +67,7 @@ local function Path(self, ...)
* event - the event triggering the update (string)
* ... - the arguments accompanying the event (string)
--]]
return (self.AssistantIndicator.Override or Update) (self, unpack(arg))
return (self.AssistantIndicator.Override or Update) (self, event, a, b, c, d, e)
end
local function ForceUpdate(element)
+3 -3
View File
@@ -368,9 +368,9 @@ local function onUpdate(self, elapsed)
end
end
local function Update(self, ...)
SPELLCAST_START(self, unpack(arg))
return SPELLCAST_CHANNEL_START(self, unpack(arg))
local function Update(self, event, a, b, c, d, e)
SPELLCAST_START(self, event, a, b, c, d, e)
return SPELLCAST_CHANNEL_START(self, event, a, b, c, d, e)
end
local function ForceUpdate(element)
@@ -57,14 +57,14 @@ local function Update(self, event)
end
end
local function Path(self, ...)
local function Path(self, event, a, b, c, d, e)
--[[ Override: CombatIndicator.Override(self, event)
Used to completely override the internal update function.
* self - the parent object
* event - the event triggering the update (string)
--]]
return (self.CombatIndicator.Override or Update) (self, unpack(arg))
return (self.CombatIndicator.Override or Update) (self, event, a, b, c, d, e)
end
local function ForceUpdate(element)
+2 -2
View File
@@ -67,7 +67,7 @@ local function Update(self, event)
end
end
local function Path(self, ...)
local function Path(self, event, a, b, c, d, e)
--[[ Override: ComboPoints.Override(self, event, ...)
Used to completely override the internal update function.
@@ -75,7 +75,7 @@ local function Path(self, ...)
* event - the event triggering the update (string)
* ... - the arguments accompanying the event
--]]
return (self.ComboPoints.Override or Update) (self, unpack(arg))
return (self.ComboPoints.Override or Update) (self, event, a, b, c, d, e)
end
local function ForceUpdate(element)
@@ -73,7 +73,7 @@ local function Update(self, event, unit)
end
end
local function Path(self, ...)
local function Path(self, event, a, b, c, d, e)
--[[ Override: HappinessIndicator.Override(self, event, ...)
Used to completely override the internal update function.
@@ -81,7 +81,7 @@ local function Path(self, ...)
* event - the event triggering the update (string)
* ... - the arguments accompanying the event
--]]
return (self.HappinessIndicator.Override or Update) (self, unpack(arg))
return (self.HappinessIndicator.Override or Update) (self, event, a, b, c, d, e)
end
local function ForceUpdate(element)
+2 -2
View File
@@ -187,7 +187,7 @@ local function Update(self, event, unit)
end
end
local function Path(self, ...)
local function Path(self, event, a, b, c, d, e)
--[[ Override: Health.Override(self, event, unit)
Used to completely override the internal update function.
@@ -195,7 +195,7 @@ local function Path(self, ...)
* event - the event triggering the update (string)
* unit - the unit accompanying the event (string)
--]]
return (self.Health.Override or Update) (self, unpack(arg))
return (self.Health.Override or Update) (self, event, a, b, c, d, e)
end
local function ForceUpdate(element)
@@ -60,7 +60,7 @@ local function Update(self, event)
end
end
local function Path(self, ...)
local function Path(self, event, a, b, c, d, e)
--[[ Override: LeaderIndicator.Override(self, event, ...)
Used to completely override the internal update function.
@@ -68,7 +68,7 @@ local function Path(self, ...)
* event - the event triggering the update (string)
* ... - the arguments accompanying the event
--]]
return (self.LeaderIndicator.Override or Update) (self, unpack(arg))
return (self.LeaderIndicator.Override or Update) (self, event, a, b, c, d, e)
end
local function ForceUpdate(element)
@@ -81,7 +81,7 @@ local function Update(self, event)
end
end
local function Path(self, ...)
local function Path(self, event, a, b, c, d, e)
--[[ Override: MasterLooterIndicator.Override(self, event, ...)
Used to completely override the internal update function.
@@ -89,7 +89,7 @@ local function Path(self, ...)
* event - the event triggering the update (string)
* ... - the arguments accompanying the event
--]]
return (self.MasterLooterIndicator.Override or Update) (self, unpack(arg))
return (self.MasterLooterIndicator.Override or Update) (self, event, a, b, c, d, e)
end
local function ForceUpdate(element)
+2 -2
View File
@@ -91,7 +91,7 @@ local function Update(self, event, unit)
end
end
local function Path(self, ...)
local function Path(self, event, a, b, c, d, e)
--[[ Override: Portrait.Override(self, event, unit)
Used to completely override the internal update function.
@@ -99,7 +99,7 @@ local function Path(self, ...)
* event - the event triggering the update (string)
* unit - the unit accompanying the event (string)
--]]
return (self.Portrait.Override or Update) (self, unpack(arg))
return (self.Portrait.Override or Update) (self, event, a, b, c, d, e)
end
local function ForceUpdate(element)
+2 -2
View File
@@ -202,7 +202,7 @@ local function Update(self, event, unit)
end
end
local function Path(self, ...)
local function Path(self, event, a, b, c, d, e)
--[[ Override: Power.Override(self, event, unit, ...)
Used to completely override the internal update function.
@@ -211,7 +211,7 @@ local function Path(self, ...)
* unit - the unit accompanying the event (string)
* ... - the arguments accompanying the event
--]]
return (self.Power.Override or Update) (self, unpack(arg))
return (self.Power.Override or Update) (self, event, a, b, c, d, e)
end
local function ForceUpdate(element)
@@ -79,7 +79,7 @@ local function Update(self, event, unit)
end
end
local function Path(self, ...)
local function Path(self, event, a, b, c, d, e)
--[[Override: PvPIndicator.Override(self, event, ...)
Used to completely override the internal update function.
@@ -87,7 +87,7 @@ local function Path(self, ...)
* event - the event triggering the update (string)
* ... - the arguments accompanying the event
--]]
return (self.PvPIndicator.Override or Update) (self, unpack(arg))
return (self.PvPIndicator.Override or Update) (self, event, a, b, c, d, e)
end
local function ForceUpdate(element)
@@ -59,14 +59,14 @@ local function Update(self, event)
end
end
local function Path(self, ...)
local function Path(self, event, a, b, c, d, e)
--[[ Override: RaidTargetIndicator.Override(self, event)
Used to completely override the internal update function.
* self - the parent object
* event - the event triggering the update (string)
--]]
return (self.RaidTargetIndicator.Override or Update) (self, unpack(arg))
return (self.RaidTargetIndicator.Override or Update) (self, event, a, b, c, d, e)
end
local function ForceUpdate(element)
+2 -2
View File
@@ -73,14 +73,14 @@ local function Update(self, event)
end
end
local function Path(self, ...)
local function Path(self, event, a, b, c, d, e)
--[[ Override: Range.Override(self, event)
Used to completely override the internal update function.
* self - the parent object
* event - the event triggering the update (string)
--]]
return (self.Range.Override or Update) (self, unpack(arg))
return (self.Range.Override or Update) (self, event, a, b, c, d, e)
end
-- Internal updating method
@@ -57,14 +57,14 @@ local function Update(self, event)
end
end
local function Path(self, ...)
local function Path(self, event, a, b, c, d, e)
--[[ Override: RestingIndicator.Override(self, event)
Used to completely override the internal update function.
* self - the parent object
* event - the event triggering the update (string)
--]]
return (self.RestingIndicator.Override or Update) (self, unpack(arg))
return (self.RestingIndicator.Override or Update) (self, event, a, b, c, d, e)
end
local function ForceUpdate(element)
+2 -2
View File
@@ -22,9 +22,9 @@ local function onEvent()
end
local event_metatable = {
__call = function(funcs, self, ...)
__call = function(funcs, self, event, a, b, c, d, e)
for _, func in next, funcs do
func(self, unpack(arg))
func(self, event, a, b, c, d, e)
end
end,
}