diff --git a/spec/getdns-0.385.tgz b/spec/getdns-0.385.tgz deleted file mode 100644 index 277ecb27..00000000 Binary files a/spec/getdns-0.385.tgz and /dev/null differ diff --git a/spec/getdns-0.386.tgz b/spec/getdns-0.386.tgz new file mode 100644 index 00000000..754892c1 Binary files /dev/null and b/spec/getdns-0.386.tgz differ diff --git a/spec/getdns_core_only.c b/spec/getdns_core_only.c index 156e55ab..a1852c41 100644 --- a/spec/getdns_core_only.c +++ b/spec/getdns_core_only.c @@ -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, diff --git a/spec/getdns_core_only.h b/spec/getdns_core_only.h index 5bce7db2..4c627052 100644 --- a/spec/getdns_core_only.h +++ b/spec/getdns_core_only.h @@ -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)( diff --git a/spec/index.html b/spec/index.html index aef9726b..0b195245 100644 --- a/spec/index.html +++ b/spec/index.html @@ -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.

The helper getter functions return references to getdns_dict, getdns_list and getdns_bindata data structures. -The user must not 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.

+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.

2.1 Creating Data Structures

@@ -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);

Lists are extended with the getdns_list_set_ calls with the index set to the @@ -1136,8 +1136,8 @@ getdns_convert_fqdn_to_dns_name( ); -

The returned values are allocated with the default system allocator (malloc). -The caller is responsible of disposing these allocations with free.

+

The returned values are allocated with the default system allocator, namely malloc. +The caller is responsible of disposing these allocations with free.

5. Additional Definitions and Descriptions

@@ -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.

-

All memory locations returned by these helper functions are allocated by the default system allocator (malloc). +

All memory locations returned by these helper functions are allocated by the default system allocator, namely malloc. The caller is responsible of disposing these allocations with free.

8. DNS Contexts

@@ -2427,7 +2427,7 @@ The response dicts inherit the custom memory management functions and the value

9. The Generated Files

-

There is a tarball that includes the .h files, +

There is a tarball 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