Tcl_GetKeyedListKeys(TCL)
π NAME π
okay bestie, meet the whole keyed-list management squad: TclX_NewKeyedListObj, TclX_KeyedListGet, TclX_KeyedListSet, TclX_KeyedListDelete, and TclX_KeyedListGetKeys. They're the keyed list management routines, and yes, they're all on the same friend group.
psst β this is the page forTcl_GetKeyedListKeys(TCL), living in theTclmanual. iykyk π
β¨ 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. If you need the whole lore drop on what a keyed list even is, go read the Extended Tcl man page β it's giving origin story. π
π¦ TclX_NewKeyedListObj
Create and initialize a brand new keyed list object. Fresh out the box, no notes. β¨
Returns:
- A pointer to the object. π
π TclX_KeyedListGet
Retrieve a key value from a keyed list. literally the "bestie hand me that" of the group.
Parameters:
interpβ if there's an error, the error message gets returned in the result.keylPtrβ the keyed list object we're getting the key from.keyβ the name of the key to extract. it will recursively process sub-keys separated by'.'. π«ΆvalueObjPtrPtrβ if the key is found, a pointer to the key object gets returned here.NULLis returned if the key is not present. (not me checking for theNULL... π)
Returns:
TCL_OKβ if the key value was returned. slay.TCL_BREAKβ if the key was not found. πTCL_ERRORβ if an error occurred. π
π§ TclX_KeyedListSet
Set a key value in a keyed list object. main character energy, you're putting your mark on it.
Parameters:
interpβ the error message will be returned in the result object.keylPtrβ the keyed list object to update.keyβ the name of the key to extract. it will recursively process sub-keys separated by'.'.valueObjPtrβ the value to set for the key.
Returns:
TCL_OKorTCL_ERROR. that's the whole vibe check.
π TclX_KeyedListDelete
Delete a key value from a keyed list. we're Marie Kondo-ing that key, it no longer sparks joy. ποΈβ¨
Parameters:
interpβ if there's an error, the error message gets returned in the result.keylPtrβ the keyed list object to update.keyβ the name of the key to extract. it will recursively process sub-keys separated by'.'.
Returns:
TCL_OKβ if the key was deleted.TCL_BREAKβ if the key was not found.TCL_ERRORβ if an error occurred.
β TclX_KeyedListGetKeys
Retrieve a list of keyed list keys. the "who's all here" headcount of the function family. π
Parameters:
interpβ if there's an error, the error message gets returned in the result.keylPtrβ the keyed list object to get keys from.keyβ the name of the key to get the sub keys for.NULLor empty to retrieve all top level keys. π«ΆlistObjPtrPtrβ the list object is returned here, with the keys as values.
Returns:
TCL_OKβ if zero or more keys were returned.TCL_BREAKβ if the key was not found.TCL_ERRORβ if an error occurred.
fr fr, read those return values carefully βTCL_BREAKis not the same asTCL_ERROR, and mixing them up is lowkey a vibe killer. π
and that's the whole page, bestie! this icon came from the Tcl manual, filed under Tcl_GetKeyedListKeys(TCL). no cap, go write some keyed lists now. periodt π
ππ
π¦ where this page comes from
- fedora 43: tclx-devel 8.4.0-51.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: tclx-devel 8.4.0-51.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: tclx-devel 8.4.0-52.fc44 Β· LicenseRef-Callaway-BSD
- fedora 44: tclx-devel 8.4.0-52.fc44 Β· LicenseRef-Callaway-BSD
- 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