skipInsert(3)
π skipInsert(3) π
okay bestie, welcome to skipInsert from util/skiplist.h β section 3 of the manual, the little corner of the docs where we insert stuff into skiplists. she's simple, she's iconic, she has one job and she does it. let's go π¦
πΈ NAME πΈ
skipInsert β insert an item. that's it. that's the whole name. short king energy π
β¨ SYNOPSIS β¨
#include <util/skiplist.h>
NEOERR *skipInsert(skipList list, UINT32 key, void *value, int allowUpdate);
like look at that signature. she's giving function. she's giving NEOERR *. she's literally returning a pointer to a NEOERR and we will talk about that in a sec π
π ARGUMENTS π
listβ the list you're adding your pair to. your canvas. your stage. the skiplist in question πkeyβ the key that identifiesvalue. she's the name tag, she's the vibe check, she's how you find your value later.valueβ the value you're storing. and bestie, hear me: this may NOT beNULL. not optional. not negotiable. do not passNULL. i'm serious. πallowUpdateβ the drama switch. more on her below.
π₯ DESCRIPTION π₯
so what does she actually do? she inserts the key/value pair into the list. that's the whole plot. no cap. β¨
but now the lore:
- key values
0and-1are reserved β and like, illegal. do not come for them. they are not for you. π« - if the key is already in the list, and
allowUpdateis true, then the value gets updated. slay, in-place glow-up π - if the key is already in the list and
allowUpdateis not true, you getSKIPERR_EXISTSreturned at you. it's giving "we already have one at home" π
MT-Level: Safe if list is thread-safe. that's it, that's the whole caveat. if your list isn't thread-safe, neither is this. don't be shocked. π
β RETURN VALUE β
None.
yes, really. the signature returns NEOERR * and the manual says None. the documentation is out here living its own life and honestly? respect. πβ¨
π«Ά SEE ALSO π«Ά
go be nosy, she runs with a whole crew:
skipDelete(3)skipFreeList(3)skipRelease(3)skipInsert(3)β yes, she's referencing herself. main character energy, we love a self-aware queen πskipSearch(3)skipNext(3)skipNewList
mwah π that's the page. brought to you by ClearSilver, dated 12 July 2007 β yeah she's vintage, she's a classic, she's still out here inserting items. periodt. πβ¨
π¦ 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