hdf_obj_top(3)
π hdf_obj_top β bestie, lemme introduce u to util/neo_hdf.h β¨
okay so this is hdf_obj_top(3), and no cap it's one of the shortest lil functions in the whole hdf fam, but it's lowkey iconic. sit down, grab a strawberry π, let's go.
πΈ NAME πΈ
hdf_obj_top β Return the pointer to the top dataset node
like literally that's it, that's the whole job. she points at the top. main character energy, minimal effort π
β¨ SYNOPSIS β¨
#include <util/neo_hdf.h>
HDF* hdf_obj_top (HDF *hdf);
π ARGUMENTS π
hdfβ the hdf dataset node. yes bestie, any node. it doesn't have to be the top one already, she'll find her way home π
π¦ DESCRIPTION π¦
okay so hdf_obj_top is an accessor function β meaning she's not out here changing anything, she's just handing u a pointer, okurrr β and what she returns is a pointer to the top of the dataset. that's the node which was returned by hdf_init. the origin. the mothership. the one that started it all π
and why would u even want that?? the way that this is most useful for implementations of language wrappers where individual nodes are tied garbage collection wise to the top node of the data set. so like, when ur wrapping this in some other language and the lil baby nodes need to keep the big top node alive so nobody gets freed too early β that's the vibe. it's giving "keep the parent on the line so the kids don't get collected" ππ«Ά
ngl if u don't know what garbage collection is, the short version: stuff gets deleted when nobody's holding onto it anymore. this function is how u hold onto the top. iykyk.
π RETURN VALUE π
None
(fr fr. the original says none. yes that's a lil weird for a function whose whole thing is returning a pointer, but that's what the page says and we do NOT editorialize on the classics π)
π SEE ALSO π
the whole squad, in the exact order they showed up:
hdf_set_symlink(3)hdf_get_valuef(3)compareFunc)(3)hdf_dump_str(3)hdf_get_int_value(3)hdf_read_string_ignore(3)hdf_copy(3)hdf_get_node(3)hdf_set_value(3)hdf_obj_child(3)hdf_read_string(3)hdf_set_buf(3)hdf_register_fileload(3)hdf_get_obj(3)hdf_get_attr(3)hdf_obj_top(3)hdf_dump_format(3)hdf_destroy(3)hdf_init(3)hdf_obj_value(3)hdf_write_string(3)hdf_set_valuevf(3)hdf_sort_obj(3)hdf_write_file_atomic(3)hdf_obj_attr(3)hdf_set_valuef(3)hdf_get_copy(3)hdf_write_file(3)hdf_get_valuevf(3)hdf_set_int_value(3)hdf_dump(3)hdf_get_value(3)hdf_set_copy(3)hdf_obj_next(3)hdf_search_path(3)hdf_obj_name(3)hdf_set_attr(3)hdf_get_child(3)hdf_remove_tree
(not me noticing compareFunc)(3) and bare hdf_remove_tree at the end β we're keeping them EXACTLY as written, no fixing, no cap, that's the lore β¨)
and that's the whole page bestie!! go forth and point at the top of ur dataset π«Ά
mwah π β this lil page is brought to u by ClearSilver, dated 12 July 2007. yeah she's vintage. she's a classic. she still ate. π β¨
π¦ where this page comes from
- debian bookworm: clearsilver-dev 0.10.5-4+b5
- debian trixie: clearsilver-dev 0.10.5-6+b1
- epel 10: clearsilver 0.10.5-80.el10_2 Β· Apache-1.1
- epel 9: clearsilver 0.10.5-74.el9 Β· Apache-1.1
- fedora 43: clearsilver 0.10.5-80.fc43 Β· Apache-1.1
- fedora 44: clearsilver 0.10.5-82.fc44 Β· Apache-1.1
- ubuntu jammy: clearsilver-dev 0.10.5-4build3
- ubuntu noble: clearsilver-dev 0.10.5-4build7
- ubuntu questing: clearsilver-dev 0.10.5-6build1
- ubuntu resolute: clearsilver-dev 0.10.5-7
- ubuntu stonking: clearsilver-dev 0.10.5-7build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms