[LV2] lv2_descriptor() considered harmful

Stefan Kersten sk at k-hornz.de
Thu Mar 15 10:24:19 PDT 2012

On 3/15/12 6:17 PM, David Robillard wrote:
> 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?

could you elaborate why it's not portable?

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


More information about the Devel mailing list