gd_free_entry_strings(3)
π gd_free_entry_strings β bestie edition π
okay so we're in the GETDATA manual, section 3, and this page is all about gd_free_entry_strings π§Ήβ¨
β¨ NAME β¨
gd_free_entry_strings β literally just frees the strings inside a GetData gd_entry_t object, no drama π
πΈ SYNOPSIS πΈ
#include <getdata.h>
gd_entry_t *gd_free_entry_strings(gd_entry_t *entry);
π¦ DESCRIPTION π¦
okay so here's the tea β β gd_free_entry_strings() frees the character strings that live inside the gd_entry_t object called entry, and those strings were previously allocated by a call to gd_entry(3). like, you didn't make those, gd_entry(3) made those, so this is the cleanup crew π§
the way that it frees a string and then sets the associated pointer to NULL?? iconic. no dangling pointers in this household π
ββοΈ
and if entry is NULL? bestie, it just does nothing. not a single thing. vibes only π
if entry is non-NULL, it must point to a valid and properly initialised gd_entry_t object, like the kind you'd get back from gd_entry(3). no fake entries, no half-initialised chaos, we're not doing that here π«Ά
by default, the strings get deallocated by calling free(3) on each one β but lowkey you can bring your own memory manager instead, by calling gd_alloc_funcs(3) before you call this function. customize your whole setup, main character energy fr fr π
if you wanna know what the gd_entry_t data type even is, go read gd_entry(3), it's all in there π
β RETURN VALUE β
gd_free_entry_strings() always returns its input, entry. that's it. that's the whole return value. it hands you back what you gave it π
π NOTES π
this function is provided as a convenience only β a little treat, a lil helper, a shortcut π
like, the caller is fully allowed to deallocate the strings in the gd_entry_t object provided by gd_entry(3) themselves, simply by calling the deallocator on each initialised string member, if they'd rather do it that way. you do you, bestie π
π HISTORY π
- the
dirfile_free_entry_strings()function appeared in GetData-0.3.0 β a classic, an OG π°οΈ - in GetData-0.7.0, this function was renamed to
gd_free_entry_strings(). glow-up era β¨
π SEE ALSO π
and that's the whole page, no cap π this was Version 0.10.0, dated 25 December 2016 β happy holidays from the GetData girlies, mwah ππ¦πΈ
π¦ where this page comes from
- debian bookworm: libgetdata-doc 0.11.0-6
- debian trixie: libgetdata-doc 0.11.0-15
- fedora 43: getdata-devel 0.11.0-13.fc43 Β· GPL-2.0-or-later
- fedora 43: getdata-devel 0.11.0-13.fc43 Β· GPL-2.0-or-later
- fedora 44: getdata-devel 0.11.0-14.fc44 Β· GPL-2.0-or-later
- fedora 44: getdata-devel 0.11.0-14.fc44 Β· GPL-2.0-or-later
- nixos 26.05: getdata 0.11.0
- nixpkgs unstable: getdata 0.11.0
- ubuntu jammy: libgetdata-doc 0.11.0-3ubuntu1
- ubuntu noble: libgetdata-doc 0.11.0-13
- ubuntu questing: libgetdata-doc 0.11.0-15
- ubuntu resolute: libgetdata-doc 0.11.0-17build1
- ubuntu stonking: libgetdata-doc 0.11.0-17build2
- Copyright (C) 2016 D. V. Wiebe
- Copyright (C) 2008, 2010, 2013, 2016 D. V. Wiebe
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms