Monty Taylor wrote:
> Stewart Smith wrote:
>> On Mon, 2008-08-04 at 10:54 -0400, Jay Pipes wrote:
>>> -1
>>>
>>> I would prefer not to get into the game of the plugin developer having
>>> to know a different function for each type of plugin they develop.  Just
>>> do something like krow suggests with a base class inheritance:
>> <snip>
>>> That way, plugin developers just call a single register_plugin()
>>> function and the kernel takes care of allocating/assigning the passed-in
>>> pointer to the appropriate HASH of plugins for that plugin_type...
>> supporting C only plugins is a good thing though, so requiring C++ may
>> not be the best thing... although....
> 
> Just to be devil's advocate... the whole server codebase (drizzled/*
> subtract sql_state.c and stacktrace.c) is .cc files... (won't claim it's
> solid C++, but still...) is there really a benefit to pure-C plugins?

Binary portability.

>> struct plugin {
>>     enum plugin_type type;
>>     union {
>>      struct function func;
>>      struct engine engine;
>>     }
>> };
>>
>> could work....
> 
> I would really rather have the struct of function pointers than the
> thing above... Why? Because I would eventually love to be able to do
> plugins in not C or C++ (python, etc) and mapping unions of structs to
> any language that isn't C is a real pain (mgmapi has one of those
> constructs, and it gives me hives)

I second that.

/Matz

-- 
Mats Kindahl
Lead Software Developer
Replication Team
MySQL AB, www.mysql.com
begin:vcard
fn:Mats Kindahl
n:Kindahl;Mats
org:Sun Microsystems
adr;quoted-printable:;;Tegv=C3=A4gen 3;Storvreta;SE;74334;Sweden
email;internet:[EMAIL PROTECTED]
title:Lead Replication Software Developer
x-mozilla-html:FALSE
version:2.1
end:vcard

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to