File tree Expand file tree Collapse file tree
include/stdcorelib/plugin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,13 +71,7 @@ namespace stdc::plugin {
7171
7272}
7373
74- #if !defined(STDC_PLUGIN_LIBRARY) && defined(_MSC_VER)
75- // MSVC needs the dllimport declaration when inline registry code references the
76- // exported _head and _tail data members. GNU-family compilers must instantiate
77- // AddFactory locally because an outer explicit instantiation does not instantiate
78- // the nested class.
79- extern template class STDC_PLUGIN_EXPORT stdc::StaticRegistry<stdc::plugin::StaticPlugin>;
80- #endif
74+ STDC_DECLARE_EXPORTED_STATIC_REGISTRY (stdc::plugin::StaticPlugin, STDC_PLUGIN_EXPORT )
8175
8276// / The entry-point symbol exported by a dynamic plugin.
8377#define STDC_PLUGIN_INSTANCE_SYMBOL " stdc_plugin_instance"
Original file line number Diff line number Diff line change 1818
1919namespace fs = std::filesystem;
2020
21- STDC_INSTANTIATE_STATIC_REGISTRY_EXPORT (stdc::plugin::StaticPlugin, STDC_PLUGIN_EXPORT )
21+ STDC_STATIC_REGISTRY (stdc::plugin::StaticPlugin)
2222
2323namespace stdc ::plugin {
2424
Original file line number Diff line number Diff line change @@ -244,16 +244,19 @@ namespace stdc::plugin {
244244 PluginLoader::PluginLoader (const std::filesystem::path &filePath,
245245 const std::optional<std::filesystem::path> &metadataPath)
246246 : PluginLoader() {
247- _impl->readLibrary (filePath, metadataPath);
247+ stdc_impl_t ;
248+ impl.readLibrary (filePath, metadataPath);
248249 }
249250
250251 PluginLoader::PluginLoader (const StaticPlugin &plugin) : PluginLoader() {
251- _impl->setStaticPlugin (plugin);
252+ stdc_impl_t ;
253+ impl.setStaticPlugin (plugin);
252254 }
253255
254256 PluginLoader::PluginLoader (std::string_view iid, Plugin *plugin, const json::Value &metadata)
255257 : PluginLoader() {
256- _impl->setRuntimePlugin (iid, plugin, metadata);
258+ stdc_impl_t ;
259+ impl.setRuntimePlugin (iid, plugin, metadata);
257260 }
258261
259262 PluginLoader::~PluginLoader () = default ;
You can’t perform that action at this time.
0 commit comments