From cfde247ef7f1fef94529bb25215f3cccf2646039 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 27 May 2014 19:25:52 -0700 Subject: [PATCH] Revert "Call OnLibraryAdded for all available librarys (bug 5925, pull request #4)" This reverts commit ac11eb8910b1c43b6e76bd388300c6f5016a4b36. --- core/logic/PluginSys.cpp | 32 -------------------------------- core/logic/PluginSys.h | 5 ----- 2 files changed, 37 deletions(-) diff --git a/core/logic/PluginSys.cpp b/core/logic/PluginSys.cpp index 2e7f45e4..0526cee3 100644 --- a/core/logic/PluginSys.cpp +++ b/core/logic/PluginSys.cpp @@ -427,24 +427,6 @@ APLRes CPlugin::Call_AskPluginLoad(char *error, size_t maxlength) } } -void CPlugin::Call_OnLibraryAdded(const char *lib) -{ - if (m_status > Plugin_Paused) - { - return; - } - - cell_t result; - IPluginFunction *pFunction = m_pRuntime->GetFunctionByName("OnLibraryAdded"); - if (!pFunction) - { - return; - } - - pFunction->PushString(lib); - pFunction->Execute(&result); -} - void *CPlugin::GetPluginStructure() { return NULL; @@ -1422,20 +1404,6 @@ bool CPluginManager::RunSecondPass(CPlugin *pPlugin, char *error, size_t maxleng /* :TODO: optimize? does this even matter? */ pPlugin->GetPhrases()->AddPhraseFile("core.phrases"); - - /* Go through all other already loaded plugins and tell this plugin, that their libraries are loaded */ - for (List::iterator pl_iter = m_plugins.begin(); pl_iter != m_plugins.end(); pl_iter++) - { - CPlugin *pl = (*pl_iter); - /* Don't call our own libraries again and only care for already loaded plugins */ - if (pl == pPlugin || pl->GetStatus() != Plugin_Running) - continue; - - for (s_iter=pl->m_Libraries.begin(); s_iter!=pl->m_Libraries.end(); s_iter++) - { - pPlugin->Call_OnLibraryAdded((*s_iter).c_str()); - } - } return true; } diff --git a/core/logic/PluginSys.h b/core/logic/PluginSys.h index 2cd08f47..f231dacb 100644 --- a/core/logic/PluginSys.h +++ b/core/logic/PluginSys.h @@ -204,11 +204,6 @@ public: */ void Call_OnAllPluginsLoaded(); - /** - * Calls the OnLibraryAdded function. - */ - void Call_OnLibraryAdded(const char *lib); - /** * Returns true if a plugin is usable. */