Tcl_GetKeyedListKeys(3tcl)
π Tcl_GetKeyedListKeys β the keyed list glow-up π
okay bestie, sit down, hydrate, because we're talking about the keyed list management routines from the 3tcl manual. yes this page is literally named Tcl_GetKeyedListKeys but it's actually a whole squad of functions. we love a group effort. π«Ά
β¨ NAME β¨
TclX_NewKeyedListObj, TclX_KeyedListGet, TclX_KeyedListSet, TclX_KeyedListDelete, TclX_KeyedListGetKeys β the keyed list management routines, aka the girlies who handle your keyed lists for you. π
πΈ SYNOPSIS πΈ
#include <tclExtend.h>
Tcl_Obj *
TclX_NewKeyedListObj (void);
int
TclX_KeyedListGet (Tcl_Interp *interp,
Tcl_Obj *keylPtr,
char *key,
Tcl_Obj **valuePtrPtr);
int
TclX_KeyedListSet (Tcl_Interp *interp,
Tcl_Obj *keylPtr,
char *key,
Tcl_Obj *valuePtr);
int
TclX_KeyedListDelete (Tcl_Interp *interp,
Tcl_Obj *keylPtr,
char *key);
int
TclX_KeyedListGetKeys (Tcl_Interp *interp,
Tcl_Obj *keylPtr,
char *key,
Tcl_Obj **listObjPtrPtr);
π¦ DESCRIPTION π¦
so these routines do operations on keyed lists. that's the whole vibe. π
if you want the full lore on what a keyed list even is, go read the Extended Tcl man page. this page is just the operations, no origin story.
π TclX_NewKeyedListObj π
create and initialize a new keyed list object. fresh out the box, brand new, no notes. β¨
Returns:
- a pointer to the object. that's it, that's the whole return. π
π TclX_KeyedListGet π
retrieve a key value from a keyed list. the "give me that one thing" function.
Parameters:
interpβ error message will be return in result if there is an error.keylPtrβ keyed list object to get key from.keyβ the name of the key to extract. will recusively process sub-keys separated by'.'.valueObjPtrPtrβ if the key is found, a pointer to the key object is returned here.NULLis returned if the key is not present.
Returns:
TCL_OKβ if the key value was returned. slay. βTCL_BREAKβ if the key was not found. πTCL_ERRORβ if an error occurred. π
quick heads up bestie: yes, the original says "recusively." we're keeping the facts exactly as written because that's the rule. also interp says "will be return in result" β same deal, copying the truth, not fixing the grammar. π
π₯ TclX_KeyedListSet π₯
set a key value in keyed list object. this is the "put that thing down right here" function.
Parameters:
interpβ error message will be return in result object.keylPtrβ keyed list object to update.keyβ the name of the key to extract. will recusively process sub-key separated by'.'.valueObjPtrβ the value to set for the key.
Returns:
TCL_OKorTCL_ERROR. no in between, no gray area, it's giving binary. β¨
π TclX_KeyedListDelete π
delete a key value from keyed list. the "and we are never speaking again" function. π
Parameters:
interpβ error message will be return in result if there is an error.keylPtrβ keyed list object to update.keyβ the name of the key to extract. will recusively process sub-key separated by'.'.
Returns:
TCL_OKβ if the key was deleted. gone, deleted, blocked. βTCL_BREAKβ if the key was not found. it was never there bestie. πTCL_ERRORβ if an error occurred. π
π§ TclX_KeyedListGetKeys π§
retrieve a list of keyed list keys. basically "who's in the group chat" but for your keyed list. π
Parameters:
interpβ error message will be return in result if there is an error.keylPtrβ keyed list object to get key from.keyβ the name of the key to get the sub keys for.NULLor empty to retrieve all top level keys.listObjPtrPtrβ list object is returned here with key as values.
Returns:
TCL_OKβ if the zero or more key where returned. βTCL_BREAKβ if the key was not found. πTCL_ERRORβ if an error occurred. π
π«Ά the sign-off π«Ά
and that's the page, bestie. this whole thing comes to you from the Tcl manual, filed under Tcl_GetKeyedListKeys(3tcl). you're welcome, go forth and manage your keyed lists responsibly. no cap. πβ¨ππ¦πΈπ
π¦ where this page comes from
- ubuntu stonking: tcl-tclx-doc 8.6.3+dfsg-3 Β· NTP
- Copyright 1992-1999 Karl Lehenbauer and Mark Diekhans
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms