QB_ARRAY_CREATE_2(3)
π QB_ARRAY_CREATE_2 π
okay bestie, so this one lives in the libqb Programmer's Manual (it's a section 3 page, so you know it's a C function situation π
) and honestly? it's giving "let me build you an array with fixed sized elements" and I am obsessed.
β¨ NAME β¨
qb_array_create_2 β Create an array with fixed sized elements.
no cap, that's the whole job. she creates arrays. fixed sized elements only. iconic behaviour tbh.
πΈ SYNOPSIS πΈ
#include <qb/qbarray.h>
qb_array_t * qb_array_create_2(
size_t max_elements, /* initial max elements */
size_t element_size, /* size of each element */
size_t autogrow_elements /* the number of elements to grow automatically by. */
);
likeβ¦ look at her. three size_t params and a qb_array_t * return. chef's kiss π«Ά
π PARAMS π
max_elementsβ the initial max elements. like, how many lil slots you're starting with. the starting lineup, if you will πelement_sizeβ size of each element. every element's gotta be the same size, that's the vibe, that's the whole point π¦autogrow_elementsβ the number of elements to grow automatically by. so when she needs more room she justβ¦ grows by this much. lowkey self-care fr fr β¨
π§ DESCRIPTION π§
so the original page justβ¦ leaves this section blank. no description. nothing. the silence is deafening π
not me pointing out that the DESCRIPTION has zero description. it's giving mystery, it's giving "figure it out from the params bestie". we respect the ambiguity π
π RETURN VALUE π
an array instance. that's it, that's the tea. you get back a qb_array_t * (the array instance) and you go live your life β
π SEE ALSO π
the whole girl gang, go say hi:
qb_array_elems_per_bin_get(3)qb_array_new_bin_cb_set(3)qb_array_create(3)qb_array_grow(3)qb_array_num_bins_get(3)qb_array_index(3)qb_array_free(3)
iykyk β one of these is your cleanup bestie and you should not be forgetting her π
π COPYRIGHT π
Copyright (C) 2010-2020 Red Hat, Inc.
and that's the page bestie!! mwah π this one came from the libqb crew, page stamped 2025-09-16, and yeah she's still rocking that same qb_array_create_2(3) energy. go forth and make arrays π¦πβ¨
π¦ where this page comes from
- fedora 44: libqb-devel 2.0.9-2.fc44 Β· LGPL-2.1-or-later
- fedora 44: libqb-devel 2.0.9-2.fc44 Β· LGPL-2.1-or-later
- ubuntu resolute: libqb-dev 2.0.9-1ubuntu1 Β· LGPL-2.1-or-later
- ubuntu stonking: libqb-dev 2.0.9-1ubuntu1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms