[getdns-api] Feedback wanted for getdns_context_set_update_callback function (was Re: Questions and Suggestions After Implementing PHP Language Bindings)

Hollenbeck, Scott shollenbeck at verisign.com
Sun Apr 12 00:45:41 CEST 2015


> -----Original Message-----
> From: getdns-api [mailto:getdns-api-bounces at vpnc.org] On Behalf Of
> Willem Toorop
> Sent: Tuesday, April 07, 2015 10:34 AM
> To: getdns-api at vpnc.org
> Subject: [getdns-api] Feedback wanted for
> getdns_context_set_update_callback function (was Re: Questions and
> Suggestions After Implementing PHP Language Bindings)
> 
> Dear All,
> 
> As Scott Hollenbeck has rightfully noticed (see quoted message below),
> the API is inconsistent in its use of user registered functions.
> 
> A request callback function provided with an asynchronous requests, is
> given alongside a (void *) user argument which will be passed when the
> callback is called.  Similarly, user defined memory management
> functions
> accommodate a user argument (perhaps to point to a structure to help
> with memory book-keeping).  In contrast, the
> getdns_context_set_context_update_callback does provide these means.
> 
> I propose to replace it with a new function that allows an user
> argument:
> 
> getdns_return_t
> getdns_context_set_update_callback(
>   getdns_context  *context,
>   void            *userarg,
>   void            (*value)(getdns_context       *context,
>                            getdns_context_code_t changed_item,
>                            void                 *userarg)
> );
> 
> The new name is to keep the API backwards compatible.  An
> implementation
> can provide the old symbol, though undocumented.
> What do you think?

Well, *I* certainly like this idea!

Scott

_______________________________________________
getdns-api mailing list
getdns-api at vpnc.org



More information about the spec mailing list