[Devel] lv2_descriptor() considered harmful

Stefano D'Angelo zanga.mail at gmail.com
Thu Oct 20 18:11:39 PDT 2011


2011/10/21 David Robillard <d at drobilla.net>:
> On Thu, 2011-10-20 at 19:01 -0500, Gabriel M. Beddingfield wrote:
>> On 10/20/2011 05:47 PM, Stefano D'Angelo wrote:
>> >> /**
>> >>    Type of the lv2_init() function in a plugin library.
>> >> */
>> >> typedef int (*LV2_Init_Function)(const char*                bundle_path,
>> >>                                  const LV2_Feature *const * features);
>> >>
>> >> Thoughts?
>> >
>> > One word: cleanup!
>>
>> Yeah!  I thought the whole point of this was /destructors/.  We already
>> have plenty of ways to init.  :-)
>
> Cleanup would have to be done using shared library destructors, as it
> does at present.  This way still requires that.
>
> I prefer the original way, but it's more complex / more code, and means
> we have two discovery mechanisms.  I don't know.  Trade off...

Explicit init AND cleanup are also useful to avoid
OS/compiler-specific stuff. I would rather have them both.

Stefano



More information about the Devel mailing list