Sujet : Re: sample extension: how to beam created proc tolkens to unload procedure
De : wortkarg3 (at) *nospam* yahoo.com (Harald Oehlmann)
Groupes : comp.lang.tclDate : 11. Dec 2024, 11:27:14
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vjbpe3$1eljb$1@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
Am 10.12.2024 um 16:13 schrieb Emiliano:
On Tue, 10 Dec 2024 10:35:46 +0100
Harald Oehlmann <wortkarg3@yahoo.com> wrote:
You get (at least!) three "levels" for storing cliendata to Tcl:
* Per command, using the clientdata argument of Tcl_CreateObjCommand().
* Per interp, using Tcl_{Set|Get}AssocData().
* Per thread, using Tcl_GetThreadData().
I found another one. The command
Tcl_CreateNamespace(interp, name, clientData, deleteProc)
also has a clientData and deleteProc argument.
When the command of the sample application is put into a namespace (IMHO a good practice), we can use the namespace clientData to store the command tolkens.
This may avoid the associated data.
Thanks for all,
Harald