mirror of https://github.com/getdnsapi/getdns.git
[API 0.386] Set setter values const
Because they are copied
This commit is contained in:
parent
00034c2aae
commit
06b86aaad8
Binary file not shown.
Binary file not shown.
|
@ -213,13 +213,13 @@ struct getdns_list * getdns_list_create_with_extended_memory_functions(
|
|||
void getdns_list_destroy(struct getdns_list *this_list)
|
||||
{ UNUSED_PARAM(this_list); }
|
||||
|
||||
getdns_return_t getdns_list_set_dict(struct getdns_list *this_list, size_t index, struct getdns_dict *child_dict)
|
||||
getdns_return_t getdns_list_set_dict(struct getdns_list *this_list, size_t index, const struct getdns_dict *child_dict)
|
||||
{ UNUSED_PARAM(this_list); UNUSED_PARAM(index); UNUSED_PARAM(child_dict); return GETDNS_RETURN_GOOD; }
|
||||
|
||||
getdns_return_t getdns_list_set_list(struct getdns_list *this_list, size_t index, struct getdns_list *child_list)
|
||||
getdns_return_t getdns_list_set_list(struct getdns_list *this_list, size_t index, const struct getdns_list *child_list)
|
||||
{ UNUSED_PARAM(this_list); UNUSED_PARAM(index); UNUSED_PARAM(child_list); return GETDNS_RETURN_GOOD; }
|
||||
|
||||
getdns_return_t getdns_list_set_bindata(struct getdns_list *this_list, size_t index, struct getdns_bindata *child_bindata)
|
||||
getdns_return_t getdns_list_set_bindata(struct getdns_list *this_list, size_t index, const struct getdns_bindata *child_bindata)
|
||||
{ UNUSED_PARAM(this_list); UNUSED_PARAM(index); UNUSED_PARAM(child_bindata); return GETDNS_RETURN_GOOD; }
|
||||
|
||||
getdns_return_t getdns_list_set_int(struct getdns_list *this_list, size_t index, uint32_t child_uint32)
|
||||
|
@ -254,19 +254,19 @@ struct getdns_dict * getdns_dict_create_with_extended_memory_functions(
|
|||
void getdns_dict_destroy(struct getdns_dict *this_dict)
|
||||
{ UNUSED_PARAM(this_dict); }
|
||||
|
||||
getdns_return_t getdns_dict_set_dict(struct getdns_dict *this_dict, char *name, struct getdns_dict *child_dict)
|
||||
getdns_return_t getdns_dict_set_dict(struct getdns_dict *this_dict, const char *name, const struct getdns_dict *child_dict)
|
||||
{ UNUSED_PARAM(this_dict); UNUSED_PARAM(name); UNUSED_PARAM(child_dict); return GETDNS_RETURN_GOOD; }
|
||||
|
||||
getdns_return_t getdns_dict_set_list(struct getdns_dict *this_dict, char *name, struct getdns_list *child_list)
|
||||
getdns_return_t getdns_dict_set_list(struct getdns_dict *this_dict, const char *name, const struct getdns_list *child_list)
|
||||
{ UNUSED_PARAM(this_dict); UNUSED_PARAM(name); UNUSED_PARAM(child_list); return GETDNS_RETURN_GOOD; }
|
||||
|
||||
getdns_return_t getdns_dict_set_bindata(struct getdns_dict *this_dict, char *name, struct getdns_bindata *child_bindata)
|
||||
getdns_return_t getdns_dict_set_bindata(struct getdns_dict *this_dict, const char *name, const struct getdns_bindata *child_bindata)
|
||||
{ UNUSED_PARAM(this_dict); UNUSED_PARAM(name); UNUSED_PARAM(child_bindata); return GETDNS_RETURN_GOOD; }
|
||||
|
||||
getdns_return_t getdns_dict_set_int(struct getdns_dict *this_dict, char *name, uint32_t child_uint32)
|
||||
getdns_return_t getdns_dict_set_int(struct getdns_dict *this_dict, const char *name, uint32_t child_uint32)
|
||||
{ UNUSED_PARAM(this_dict); UNUSED_PARAM(name); UNUSED_PARAM(child_uint32); return GETDNS_RETURN_GOOD; }
|
||||
|
||||
getdns_return_t getdns_dict_remove_name(struct getdns_dict *this_dict, char *name)
|
||||
getdns_return_t getdns_dict_remove_name(struct getdns_dict *this_dict, const char *name)
|
||||
{ UNUSED_PARAM(this_dict); UNUSED_PARAM(name); return GETDNS_RETURN_GOOD; }
|
||||
|
||||
char *
|
||||
|
@ -322,13 +322,6 @@ getdns_context_set_context_update_callback(
|
|||
)
|
||||
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
|
||||
|
||||
getdns_return_t
|
||||
getdns_context_set_context_update(
|
||||
struct getdns_context *context,
|
||||
uint16_t value
|
||||
)
|
||||
{ UNUSED_PARAM(context); UNUSED_PARAM(value); return GETDNS_RETURN_GOOD; }
|
||||
|
||||
getdns_return_t
|
||||
getdns_context_set_resolution_type(
|
||||
struct getdns_context *context,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Created at 2014-02-03-22-00-41*/
|
||||
/* Created at 2014-02-05-21-38-00*/
|
||||
#ifndef GETDNS_H
|
||||
#define GETDNS_H
|
||||
|
||||
|
@ -297,9 +297,9 @@ struct getdns_list * getdns_list_create_with_extended_memory_functions(
|
|||
void (*free)(void *userarg, void *)
|
||||
);
|
||||
void getdns_list_destroy(struct getdns_list *this_list);
|
||||
getdns_return_t getdns_list_set_dict(struct getdns_list *this_list, size_t index, struct getdns_dict *child_dict);
|
||||
getdns_return_t getdns_list_set_list(struct getdns_list *this_list, size_t index, struct getdns_list *child_list);
|
||||
getdns_return_t getdns_list_set_bindata(struct getdns_list *this_list, size_t index, struct getdns_bindata *child_bindata);
|
||||
getdns_return_t getdns_list_set_dict(struct getdns_list *this_list, size_t index, const struct getdns_dict *child_dict);
|
||||
getdns_return_t getdns_list_set_list(struct getdns_list *this_list, size_t index, const struct getdns_list *child_list);
|
||||
getdns_return_t getdns_list_set_bindata(struct getdns_list *this_list, size_t index, const struct getdns_bindata *child_bindata);
|
||||
getdns_return_t getdns_list_set_int(struct getdns_list *this_list, size_t index, uint32_t child_uint32);
|
||||
|
||||
/* Dicts: create, destroy, and set the data at a given name */
|
||||
|
@ -319,11 +319,11 @@ struct getdns_dict * getdns_dict_create_with_extended_memory_functions(
|
|||
void (*free)(void *userarg, void *)
|
||||
);
|
||||
void getdns_dict_destroy(struct getdns_dict *this_dict);
|
||||
getdns_return_t getdns_dict_set_dict(struct getdns_dict *this_dict, char *name, struct getdns_dict *child_dict);
|
||||
getdns_return_t getdns_dict_set_list(struct getdns_dict *this_dict, char *name, struct getdns_list *child_list);
|
||||
getdns_return_t getdns_dict_set_bindata(struct getdns_dict *this_dict, char *name, struct getdns_bindata *child_bindata);
|
||||
getdns_return_t getdns_dict_set_int(struct getdns_dict *this_dict, char *name, uint32_t child_uint32);
|
||||
getdns_return_t getdns_dict_remove_name(struct getdns_dict *this_dict, char *name);
|
||||
getdns_return_t getdns_dict_set_dict(struct getdns_dict *this_dict, const char *name, const struct getdns_dict *child_dict);
|
||||
getdns_return_t getdns_dict_set_list(struct getdns_dict *this_dict, const char *name, const struct getdns_list *child_list);
|
||||
getdns_return_t getdns_dict_set_bindata(struct getdns_dict *this_dict, const char *name, const struct getdns_bindata *child_bindata);
|
||||
getdns_return_t getdns_dict_set_int(struct getdns_dict *this_dict, const char *name, uint32_t child_uint32);
|
||||
getdns_return_t getdns_dict_remove_name(struct getdns_dict *this_dict, const char *name);
|
||||
|
||||
/* Callback arguments */
|
||||
typedef void (*getdns_callback_t)(
|
||||
|
|
|
@ -554,9 +554,9 @@ are not part of the data. Also, this document uses macro names instead of some o
|
|||
arguments; of course, the data structures have the actual int in them.</p>
|
||||
|
||||
<p>The helper getter functions return references to <code>getdns_dict</code>, <code>getdns_list</code> and <code>getdns_bindata</code> data structures.
|
||||
The user must <b>not</b> destroy these retrieved "child" data structures themselves.
|
||||
They will automatically be destroyed when the containing "parent" data structure is destroyed.
|
||||
Also, retrieved "child" data structures can not be used any more after the containing "parent" data structure has been destroyed.</p>
|
||||
The user must not directly destroy these retrieved "child" data structures; instead,
|
||||
they will automatically be destroyed when the containing "parent" data structure is destroyed.
|
||||
Because of this, retrieved "child" data structures cannot be used any more after the containing "parent" data structure has been destroyed.</p>
|
||||
|
||||
<h2>2.1 Creating Data Structures</h2>
|
||||
|
||||
|
@ -582,9 +582,9 @@ struct getdns_list * getdns_list_create_with_extended_memory_functions(
|
|||
void (*free)(void *userarg, void *)
|
||||
);
|
||||
void getdns_list_destroy(struct getdns_list *this_list);
|
||||
getdns_return_t getdns_list_set_dict(struct getdns_list *this_list, size_t index, struct getdns_dict *child_dict);
|
||||
getdns_return_t getdns_list_set_list(struct getdns_list *this_list, size_t index, struct getdns_list *child_list);
|
||||
getdns_return_t getdns_list_set_bindata(struct getdns_list *this_list, size_t index, struct getdns_bindata *child_bindata);
|
||||
getdns_return_t getdns_list_set_dict(struct getdns_list *this_list, size_t index, const struct getdns_dict *child_dict);
|
||||
getdns_return_t getdns_list_set_list(struct getdns_list *this_list, size_t index, const struct getdns_list *child_list);
|
||||
getdns_return_t getdns_list_set_bindata(struct getdns_list *this_list, size_t index, const struct getdns_bindata *child_bindata);
|
||||
getdns_return_t getdns_list_set_int(struct getdns_list *this_list, size_t index, uint32_t child_uint32);
|
||||
|
||||
/* Dicts: create, destroy, and set the data at a given name */
|
||||
|
@ -604,11 +604,11 @@ struct getdns_dict * getdns_dict_create_with_extended_memory_functions(
|
|||
void (*free)(void *userarg, void *)
|
||||
);
|
||||
void getdns_dict_destroy(struct getdns_dict *this_dict);
|
||||
getdns_return_t getdns_dict_set_dict(struct getdns_dict *this_dict, char *name, struct getdns_dict *child_dict);
|
||||
getdns_return_t getdns_dict_set_list(struct getdns_dict *this_dict, char *name, struct getdns_list *child_list);
|
||||
getdns_return_t getdns_dict_set_bindata(struct getdns_dict *this_dict, char *name, struct getdns_bindata *child_bindata);
|
||||
getdns_return_t getdns_dict_set_int(struct getdns_dict *this_dict, char *name, uint32_t child_uint32);
|
||||
getdns_return_t getdns_dict_remove_name(struct getdns_dict *this_dict, char *name);
|
||||
getdns_return_t getdns_dict_set_dict(struct getdns_dict *this_dict, const char *name, const struct getdns_dict *child_dict);
|
||||
getdns_return_t getdns_dict_set_list(struct getdns_dict *this_dict, const char *name, const struct getdns_list *child_list);
|
||||
getdns_return_t getdns_dict_set_bindata(struct getdns_dict *this_dict, const char *name, const struct getdns_bindata *child_bindata);
|
||||
getdns_return_t getdns_dict_set_int(struct getdns_dict *this_dict, const char *name, uint32_t child_uint32);
|
||||
getdns_return_t getdns_dict_remove_name(struct getdns_dict *this_dict, const char *name);
|
||||
</div>
|
||||
|
||||
<p>Lists are extended with the <code>getdns_list_set_</code> calls with the <code>index</code> set to the
|
||||
|
@ -1136,8 +1136,8 @@ getdns_convert_fqdn_to_dns_name(
|
|||
);
|
||||
</div>
|
||||
|
||||
<p>The returned values are allocated with the default system allocator (<code>malloc</code>).
|
||||
The caller is responsible of disposing these allocations with free. </p>
|
||||
<p>The returned values are allocated with the default system allocator, namely <code>malloc</code>.
|
||||
The caller is responsible of disposing these allocations with <code>free</code>. </p>
|
||||
|
||||
<h1>5. Additional Definitions and Descriptions</h1>
|
||||
|
||||
|
@ -2063,7 +2063,7 @@ getdns_display_ip_address(
|
|||
of the IPv4 or IPv6 address in it. The API determines they type of address
|
||||
by the length given in the bindata.</p>
|
||||
|
||||
<p class=cont>All memory locations returned by these helper functions are allocated by the default system allocator (<code>malloc</code>).
|
||||
<p class=cont>All memory locations returned by these helper functions are allocated by the default system allocator, namely <code>malloc</code>.
|
||||
The caller is responsible of disposing these allocations with <code>free</code>.</p>
|
||||
|
||||
<h1>8. <a id="Contexts">DNS Contexts</a></h1>
|
||||
|
@ -2427,7 +2427,7 @@ The response dicts inherit the custom memory management functions and the value
|
|||
|
||||
<h1>9. The Generated Files</h1>
|
||||
|
||||
<p>There is <a href="getdns-0.385.tgz">a tarball</a> that includes the .h files,
|
||||
<p>There is <a href="getdns-0.386.tgz">a tarball</a> that includes the .h files,
|
||||
the examples, and so on. The examples all make, even though there is no API implementation, based
|
||||
on a pseudo-implementation in the tarball; see make-examples-PLATFORM.sh. Note that this currently builds fine
|
||||
on the Macintosh and Ubuntu; help is definitely appreciated on making the build process
|
||||
|
|
Loading…
Reference in New Issue