From dc9446b84dc7dda91f80c069cda745f8dcf239bf Mon Sep 17 00:00:00 2001 From: Jackmcbarn Date: Sun, 5 Oct 2014 15:52:23 -0400 Subject: [PATCH] Remove loadedLibraries Nothing actually uses this, so I'm not sure why we ever kept track of it. Change-Id: I60480b96a83731c7b25aed55099886a86efc08b1 --- engines/LuaCommon/LuaCommon.php | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/engines/LuaCommon/LuaCommon.php b/engines/LuaCommon/LuaCommon.php index 350d476f..edb81d21 100644 --- a/engines/LuaCommon/LuaCommon.php +++ b/engines/LuaCommon/LuaCommon.php @@ -45,7 +45,6 @@ abstract class Scribunto_LuaEngine extends ScribuntoEngineBase { protected $currentFrames = array(); protected $expandCache = array(); protected $availableLibraries = array(); - protected $loadedLibraries = array(); const MAX_EXPAND_CACHE_SIZE = 100; @@ -78,7 +77,6 @@ abstract class Scribunto_LuaEngine extends ScribuntoEngineBase { $this->interpreter = null; $this->mw = null; $this->expandCache = null; - $this->loadedLibraries = null; parent::destroy(); } @@ -471,18 +469,7 @@ abstract class Scribunto_LuaEngine extends ScribuntoEngineBase { throw new MWException( "No class for library \"$name\"" ); } } - $this->loadedLibraries[$name] = $class; - $ret = $this->loadedLibraries[$name]->register(); - - // @todo $this->loadedLibraries[$name] should always be unset when $ret - // is null, but we can't do that in the non-deferred case yet, since we - // need to maintain BC with extensions that don't yet return the output - // of registerInterface. - if ( $ret === null && $loadDeferred ) { - unset( $this->loadedLibraries[$name] ); - } - - return $ret; + return $class->register(); } /**