<div class="gmail_quote">2009/11/11 Rémi Denis-Courmont <span dir="ltr"><<a href="mailto:remi@remlab.net">remi@remlab.net</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
On Wed, 11 Nov 2009 01:13:34 +0100, Fabio Ritrovato<br>
<<a href="mailto:exsephiroth87@gmail.com">exsephiroth87@gmail.com</a>> wrote:<br>
> On Wed, Nov 11, 2009 at 12:07 AM, Jakob Leben <<a href="mailto:jakob.leben@gmail.com">jakob.leben@gmail.com</a>><br>
> wrote:<br>
>> If the function covers all kinds of requests, why don't we use that same<br>
>> function for item-delete requests and item-get requests? I must join the<br>
>> opinion that this is somewhat inconsistent.<br>
><br>
> Well, i guess you have a point, I just thought it was better to have 3<br>
> different functions than a big one to handle everything with a<br>
> parameter to decide what to do...<br>
<br>
</div>In fact, separate functions are probably better. Otherwise, we+ ll just end<br>
up multiplexing on the caller side and demultiplexing on the callee side,<br>
which is a waste of both developer and CPU time.<br></blockquote><div><br>I agree, my post was a bit ironic, sorry. I meant that the "put" interface could in a way be more elaborate, to _reduce_ demultiplexing and make explicit various meanings the function might have. For example: to avoid a part of demultiplexing, the function could take arguments like:<br>
( services_discovery_t *, const char * psz_request_type, const char *psz_request_data )<br><br>... Or on the other hand: why should the data necessarily be char*? what about void*?<br><br>Anyway, it being so vague, we don't profit much over leaving the plugin specific stuff to plugins and use var_Get/Set on plugin-created variables.<br>
<br></div></div>