QB_HDB_HAN...GET_ALWAYS(3)
π qb_hdb_handle_get_always β the libqb bestie that grabs your instance and bumps its refcount π
okay so bestie, we're in the libqb Programmer's Manual rn and this page is literally about one (1) function that goes and fetches the instance hanging out with your handle and then increments its refcount like the generous icon it is. no cap. π«Ά
β¨ NAME β¨
qb_hdb_handle_get_always β get the instance associated with this handle and increase it's refcount. π
πΈ SYNOPSIS πΈ
#include <qb/qbhdb.h>
int32_t qb_hdb_handle_get_always(
struct qb_hdb *hdb, /* the database instance */
qb_handle_t handle_in, /* the handle */
void **instance /* (out) pointer to the desired object. */
);
π PARAMS π
hdbβ the database instance, aka the whole vibe container ποΈhandle_inβ the handle, the little ticket that says "yeah this one" ποΈinstanceβ (out) pointer to the desired object. it's the out param, so it's giving back to you, not taking π€
π¦ DESCRIPTION π¦
lowkey the prose section is keeping it mysterious, but here's the whole β¨ STRUCTURES β¨ tea anyway:
π§ STRUCTURES π§
the struct qb_hdb itself, laid out exactly like this, do not come for me:
struct qb_hdb {
uint32_t handle_count;
qb_array_t handles;
uint32_t iterator;
void (*destructor)(void *);
uint32_t first_run;
};
that's the whole thing. handle_count, the handles array, an iterator, a destructor function pointer that takes a void *, and first_run. iconic honestly. π
β RETURN VALUE β
(0 == ok, -errno failure) β so zero means slay, negative errno means something went π.
π NOTE π
This is currently an alias to qb_hdb_handle_get.
fr fr, right now it's just another name for the same thing. not me pointing that out but here we are π
π SEE ALSO π
qb_hdb_handle_get(3)qb_hdb_iterator_reset(3)qb_hdb_handle_create(3)qb_hdb_handle_destroy(3)qb_hdb_handle_refcount_get(3)qb_hdb_iterator_next(3)qb_hdb_nocheck_convert(3)qb_hdb_create(3)qb_hdb_destroy(3)qb_hdb_base_convert(3)qb_hdb_handle_put(3)
go read those too, iykyk πβ¨
π COPYRIGHT π
Copyright (C) 2010-2020 Red Hat, Inc.
aaaand that's the page bestie!! this whole thing came from LIBQB, dated 2025-09-16, and the manual title up top was QB_HDB_HAN...GET_ALWAYS(3). mwah, go forth and get your instances π«ΆππΈ
π¦ 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