[LV2] lv2_descriptor() considered harmful

David Robillard d at drobilla.net
Thu Mar 15 10:17:53 PDT 2012

On Sun, 2012-02-26 at 17:03 -0500, David Robillard wrote:
> /**
>    Prototype for library accessor function.
>    This is the entry point for a plugin library.  Hosts load this
>    symbol from the library and call this function to obtain a
>    library descriptor which can be used to access all the UIs
>    contained in this library.  The returned object must not be
>    destroyed (using LV2_Lib_Descriptor::cleanup()) until all
>    plugins loaded from that library have been destroyed.
> */
> LV2_Lib_Descriptor const*
> lv2_lib_descriptor(const char*                bundle_path,
>                    const LV2_Feature *const * features);
> /**
>    Type of the lv2_lib_descriptor() function in an LV2 library.
> */
> typedef LV2_Lib_Descriptor const*
> (*LV2_Lib_Descriptor_Func)(const char*                bundle_path,
>                            const LV2_Feature *const * features);

Should we perhaps avoid requiring a dlsym of a function, which is
technically not portable and usually a cause of at least a warning?

Better to have a struct of function pointers in the library which is
dlsym'd instead?


More information about the Devel mailing list