QB_LIST_REPLACE(3)
π QB_LIST_REPLACE(3) π
okay bestie, gather round, because this one is from the libqb Programmer's Manual and it's literally the glow-up function for linked list entries. it's giving "out with the old, in with the new" and honestly? iconic.
β¨ NAME β¨
qb_list_replace β swap an old entry out and put a new one in its place. that's it, that's the whole job, and she does it flawlessly π
πΈ SYNOPSIS πΈ
#include <qb/qblist.h>
static void qb_list_replace(
struct qb_list_head *old_one, /* the element to be replaced */
struct qb_list_head *new_one /* the new element to insert */
);
no cap, that's the entire signature. two pointers, zero drama π«Ά
π PARAMS π
old_oneβ the element that is getting replaced. she's served her time, let her rest πnew_oneβ the new element you're inserting. main character energy, stepping into the spotlight π
π¦ DESCRIPTION π¦
π STRUCTURES π
here's the struct you're working with, bestie β memorize her, she's everywhere in this header:
struct qb_list_head {
struct next;
struct prev;
};
π SEE ALSO π
the whole friend group, fr fr:
qb_list_empty(3)qb_list_add_tail(3)qb_list_add(3)qb_list_splice_tail(3)qb_list_length(3)qb_list_init(3)qb_list_splice(3)qb_list_is_last(3)qb_list_del(3)
π COPYRIGHT π
Copyright (C) 2010-2020 Red Hat, Inc.
and that's the whole page, bestie!! go replace some entries, slay responsibly, and remember: always init your lists before you touch them π
this has been LIBQB, dated 2025-09-16, and yes it's still called QB_LIST_REPLACE(3) β periodt β¨ππ¦
π¦ 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