diff options
author | David Robillard <d@drobilla.net> | 2016-07-11 20:26:39 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2016-07-11 20:26:39 -0400 |
commit | 2f745fae447200b666c9f5810796d13a20fdf559 (patch) | |
tree | 37f5dde7f63fe36c70cf92a44f4b5835ea95aeac /src/lilv_internal.h | |
parent | 05f9e858a5dd4b3a1ba5047aa703e55da70dcfdf (diff) | |
download | lilv-2f745fae447200b666c9f5810796d13a20fdf559.tar.gz lilv-2f745fae447200b666c9f5810796d13a20fdf559.tar.bz2 lilv-2f745fae447200b666c9f5810796d13a20fdf559.zip |
Fully reset plugin struct when plugin is reloaded
This fixes a bug where, for example, after re-loading a plugin from a
different bundle, the LilvPlugin would still report the old bundle.
Also never replace a newer version with an older version when a bundle
is loaded. Ignores the entire bundle if an older plugin than one loaded
is found. This is tricky because the unit of loading/unloading is a
bundle, and the unit of versioning is a plugin, but since having data
from an old bundle still loaded seems like a bad idea, this seems like
the most correct behaviour.
Diffstat (limited to 'src/lilv_internal.h')
-rw-r--r-- | src/lilv_internal.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lilv_internal.h b/src/lilv_internal.h index ea96418..5abfcd4 100644 --- a/src/lilv_internal.h +++ b/src/lilv_internal.h @@ -1,5 +1,5 @@ /* - Copyright 2007-2015 David Robillard <http://drobilla.net> + Copyright 2007-2016 David Robillard <http://drobilla.net> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -257,6 +257,7 @@ void lilv_port_free(const LilvPlugin* plugin, LilvPort* port); LilvPlugin* lilv_plugin_new(LilvWorld* world, LilvNode* uri, LilvNode* bundle_uri); +void lilv_plugin_clear(LilvPlugin* plugin, LilvNode* bundle_uri); void lilv_plugin_load_if_necessary(const LilvPlugin* p); void lilv_plugin_free(LilvPlugin* plugin); LilvNode* lilv_plugin_get_unique(const LilvPlugin* p, @@ -428,6 +429,10 @@ static const LV2_Feature* const dman_features = { NULL }; __func__) #define LILV_WARNF(fmt, ...) fprintf(stderr, "%s(): warning: " fmt, \ __func__, __VA_ARGS__) +#define LILV_NOTE(str) fprintf(stderr, "%s(): note: " str, \ + __func__) +#define LILV_NOTEF(fmt, ...) fprintf(stderr, "%s(): note: " fmt, \ + __func__, __VA_ARGS__) #ifdef __cplusplus } |