getdns_list(3)
πΈ NAME πΈ
getdns_list, getdns_list_create, getdns_list_create_with_extended_memory_functions, getdns_list_create_with_memory_functions, getdns_list_destroy β the getdns list create-and-destroy routines, and yes we're doing this π
(oh also, this page lives in the getdns manual, section 3 β so if you ever see getdns_list(3) in the wild, that's literally just us π«Ά)
π LIBRARY π
DNS Resolver library (libgetdns, -lgetdns) β link it, love it, slay π
β¨ SYNOPSIS β¨
#include <getdns.h>
getdns_list *
getdns_list_create ()
getdns_list *
getdns_list_create_with_extended_memory_functions
(void *userarg,
void *(*malloc)(void *userarg, size_t sz),
void *(*realloc)(void *userarg, void *buf, size_t sz),
void (*free)(void *userarg, void *buf)
getdns_list *
getdns_list_create_with_memory_functions
(void *userarg,
void *(*malloc)(size_t sz),
void *(*realloc)(void *buf, size_t sz),
void (*free)(void *buf)
void
getdns_list_destroy (getdns_list *this_dict)
okay so first thing, bestie: look at how the extended version and the regular version of the memory-function creator are formatted differently up there β one's indented one way, one's the other. That's not me being chaotic, that's just how the page was born. We don't fix it. We respect it. π
π¦ DESCRIPTION π¦
So. The getdns_list type is the one that manages heterogeneous indexed lists of name/value pairs. Heterogeneous means the values don't all have to be the same type β it's giving "no dress code, everyone's invited" β¨. The data types a value can be:
getdns_bindatagetdns_dictgetdns_listuint32_t
The destroy function? She does a "deep" destroy. Which means before she destroys the list itself, she frees the storage for all of the members of the list. Every single one. No orphans left behind, no leaks, we are thorough in this house π .
There are also a whole bunch of helper functions that give you access to the list object β go check their respective man pages, they each got their own moment π
Two little argument besties show up in this page:
userargβ you pass this argument along to the user-specified memory management functions whenever there are operations on lists created using the extended memory functions. It's your lil "hey here's my context" envelope πthis_listβ the list to destroy. Bye bestie, it was real π«Ά
not me noticing the synopsis calls the destroy parameterthis_dictand the description calls itthis_listβ¦ anyway she contains multitudes π
π RETURN VALUES π
Upon successful completion, getdns_list_create hands you back a valid (empty) list structure β an empty little icon, a blank canvas, main character energy β and you should free it with a call to getdns_list_destroy. Don't just ghost it, bestie, that's a leak π
If a parameter is invalid, or literally any error happens, getdns_list_create returns NULL. Nothing. A void. The vibe check failed π
π EXAMPLES π
TBD
(yes. genuinely. that's the whole examples section. iconic behavior, honestly. the documentation said "figure it out" and went to get a boba π§)
π₯ SEE ALSO π₯
and that's the whole page, bestie!! no cap, you now understand getdns list create + destroy fr fr π
this was getdns 1.7.3, dated December 2015 β old money, still slaying, we love a vintage queen πβ¨
go forth and getdns_list_destroy everything you create, ily, bye ππ¦π
π¦ where this page comes from
- alpine 3.24: getdns-doc 1.7.3-r0 Β· BSD-3-Clause
- arch rolling: getdns 1.7.3-2 Β· BSD
- epel 10: getdns-devel 1.7.3-9.el10_2 Β· BSD-3-Clause
- epel 9: getdns-devel 1.7.3-1.el9 Β· BSD-3-Clause
- fedora 43: getdns-devel 1.7.3-9.fc43 Β· BSD-3-Clause
- fedora 43: getdns-devel 1.7.3-9.fc43 Β· BSD-3-Clause
- fedora 44: getdns-devel 1.7.3-10.fc44 Β· BSD-3-Clause
- fedora 44: getdns-devel 1.7.3-10.fc44 Β· BSD-3-Clause
- nixpkgs unstable: getdns 1.7.3
- ubuntu resolute: libgetdns-dev 1.7.3-3 Β· BSD-3-Clause
- ubuntu stonking: libgetdns-dev 1.7.3-5build1 Β· BSD-3-Clause
- Copyright (c) 2013, NLnet Labs, Verisign, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms