<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Op 10-09-13 21:21, Wiley, Glen schreef:<br>
</div>
<blockquote cite="mid:CE54E98B.15B84%25gwiley@verisign.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<div>I'd like to change the signatures for the non-trivial data
type helper functions to include the context so that we will
have access to the user defined allocators. For example</div>
<div><br>
</div>
getdns_return_t getdns_list_copy(getdns_<span
style="font-style:italic">context_</span>t context, struct
getdns_list *srclist, struct getdns_list **dstlist);
<div> </div>
getdns_return_t getdns_dict_get_names(getdns_<span
style="font-style:italic">context_</span>t context, struct
getdns_dict *dict, struct getdns_list **answer);
<div><br>
</div>
<div>What do folks think?</div>
</blockquote>
The structures representing lists and dicts could have an internal
reference to context themselves and pass it on to the newly created
lists and dicts. As long as the dicts and lists involved are
created by the lookup functions (which have the context argument)
this will be okay. It does not work when dicts and lists need to be
created separately, for example to specify extensions. Thus the
getdns_list_create and getdns_dict_create would need a context
argument.<br>
<br>
Though, I actually think it would be better if setting the custom
memory management functions should be implementation specific, just
like setting the event base is.<br>
<br>
-- Willem<br>
</body>
</html>