QB_HDB_HANDLE_GET(3)
π qb_hdb_handle_get β get ur fave instance back (and bump its refcount) π
okay so bestie, we're in the libqb Programmer's Manual, section 3, and this page is literally just about one tiny little function that goes and fetches the instance chillin' behind a handle β and then bumps its refcount so nobody yeets it out from under you. no cap. π«Ά
β¨ NAME β¨
qb_hdb_handle_get β Get the instance associated with this handle and increase it's refcount.
π SYNOPSIS π
#include <qb/qbhdb.h>
int32_t qb_hdb_handle_get(
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. this is the hdb u got ur hands on, ur whole little handle database, the moment. πhandle_inβ the handle. the actual handle u want to look up, periodt.instanceβ (out) pointer to the desired object. it's an out param, so the function writes into this β that's where ur object pointer lands. β¨
π¦ DESCRIPTION π¦
ok so ngl, the original page literally leaves this section empty β no prose, nothing, it just goes straight into the struct. so bestie there is no extra lore here, no secret tips, no hidden behaviour notes. we move. π
π STRUCTURES π
here's the struct that goes with all this, verbatim, character for character, because we do not mess with the code:
struct qb_hdb {
uint32_t handle_count;
qb_array_t handles;
uint32_t iterator;
void (*destructor)(void *);
uint32_t first_run;
};
π RETURN VALUE π
(0 == ok, -errno failure)
translation: 0 means we ate and everything's fine π
, anything negative is a failure and it's -errno, so like the negative of whatever errno was. slay.
π SEE ALSO π
go read these too, they're the whole friend group:
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_get_always(3)qb_hdb_handle_put(3)
π COPYRIGHT π
Copyright (C) 2010-2020 Red Hat, Inc.
okay that's the whole page, mwah π sending u off with the softest little sign-off: this came out of LIBQB, dated 2025-09-16, and it's filed under QB_HDB_HANDLE_GET(3) β go get that handle bestie, it's giving main character energy fr fr πβ¨π¦
π¦ 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