MT#62181 update FactoryCreate prototype

Makes a type cast unnecessary

Change-Id: I8df7d5e4657a094a4d0933c8add6d39a0d4e882a
mr13.5
Richard Fuchs 1 year ago
parent 35793aa02a
commit f6c49b8817

@ -238,7 +238,7 @@ class AmLoggingFacility : public AmPluginFactory
}
#endif
typedef void* (*FactoryCreate)();
typedef AmPluginFactory* (*FactoryCreate)();
#define STR(x) #x
#define XSTR(x) STR(x)

@ -314,28 +314,28 @@ int AmPlugIn::loadPlugIn(const string& file, const string& plugin_name,
}
if ((fc = (FactoryCreate) dlsym(*h_dl, FACTORY_SESSION_EXPORT_STR)) != NULL) {
plugin = (AmPluginFactory*)fc();
plugin = fc();
if(loadAppPlugIn(plugin))
goto error;
has_sym=true;
if (NULL != plugin) plugins.push_back(plugin);
}
if ((fc = (FactoryCreate) dlsym(*h_dl, FACTORY_SESSION_EVENT_HANDLER_EXPORT_STR)) != NULL) {
plugin = (AmPluginFactory*)fc();
plugin = fc();
if(loadSehPlugIn(plugin))
goto error;
has_sym=true;
if (NULL != plugin) plugins.push_back(plugin);
}
if ((fc = (FactoryCreate) dlsym(*h_dl, FACTORY_PLUGIN_EXPORT_STR)) != NULL) {
plugin = (AmPluginFactory*)fc();
plugin = fc();
if(loadBasePlugIn(plugin))
goto error;
has_sym=true;
if (NULL != plugin) plugins.push_back(plugin);
}
if ((fc = (FactoryCreate) dlsym(*h_dl, FACTORY_PLUGIN_CLASS_EXPORT_STR)) != NULL) {
plugin = (AmPluginFactory*)fc();
plugin = fc();
if(loadDiPlugIn(plugin))
goto error;
has_sym=true;
@ -343,7 +343,7 @@ int AmPlugIn::loadPlugIn(const string& file, const string& plugin_name,
}
if ((fc = (FactoryCreate) dlsym(*h_dl, FACTORY_LOG_FACILITY_EXPORT_STR)) != NULL) {
plugin = (AmPluginFactory*)fc();
plugin = fc();
if(loadLogFacPlugIn(plugin))
goto error;
has_sym=true;

Loading…
Cancel
Save