[getdns-api] getdns_return_t for destroy methods

Simon Perreault simon.perreault at viagenie.ca
Mon Mar 10 13:50:49 MST 2014


Le 2014-03-10 16:49, Goyal, Neel a écrit :
>> The problem with this is that you are proposing to use a run-time
>> mechanism to fix a compile-time mistake. That's something we usually try
>> to avoid.
>>
>> More appropriate IMHO would be to use an assert()-like mechanism that
>> would only be activated when the appropriate debug macro is enabled. The
>> very purpose of assert() is to find bugs introduced by programmer mistake.
> 
> I like the suggestion - to me this implies that the API specification
> should state that calling getdns_context_destroy() on the context passed
> into the getdns_callback_t is illegal.

Exactly my thinking.

Simon
-- 
DTN made easy, lean, and smart --> http://postellation.viagenie.ca
NAT64/DNS64 open-source        --> http://ecdysis.viagenie.ca
STUN/TURN server               --> http://numb.viagenie.ca


More information about the getdns-api mailing list