diff options
author | Garrett Regier <garrett.regier@riftio.com> | 2014-11-16 12:22:33 -0800 |
---|---|---|
committer | Garrett Regier <garrett.regier@riftio.com> | 2014-11-18 10:30:39 -0800 |
commit | cbd4ecf6f2026f9be895efa49ad5dbbb7a1c806c (patch) | |
tree | e7936092ac320e1e2d0892ebd21dfa1b1e7e3bf5 /libpeas/peas-plugin-loader.c | |
parent | 58b36ad61c11bf26f29d7f7df1ee914b2da200e1 (diff) | |
download | libpeas-cbd4ecf6f2026f9be895efa49ad5dbbb7a1c806c.tar.gz |
Add nonglobal plugin loader support
This allows multiple threads to each have a PeasEngine
and be used without internal locking. It also allows using
lua5.1 plugins from multiple threads.
https://bugzilla.gnome.org/show_bug.cgi?id=739831
Diffstat (limited to 'libpeas/peas-plugin-loader.c')
-rw-r--r-- | libpeas/peas-plugin-loader.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libpeas/peas-plugin-loader.c b/libpeas/peas-plugin-loader.c index ccd9078..4258bab 100644 --- a/libpeas/peas-plugin-loader.c +++ b/libpeas/peas-plugin-loader.c @@ -70,6 +70,21 @@ peas_plugin_loader_initialize (PeasPluginLoader *loader) } gboolean +peas_plugin_loader_is_global (PeasPluginLoader *loader) +{ + PeasPluginLoaderClass *klass; + + g_return_val_if_fail (PEAS_IS_PLUGIN_LOADER (loader), FALSE); + + klass = PEAS_PLUGIN_LOADER_GET_CLASS (loader); + + if (klass->is_global != NULL) + return klass->is_global (loader); + + return TRUE; +} + +gboolean peas_plugin_loader_load (PeasPluginLoader *loader, PeasPluginInfo *info) { |