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 : 10. Dec 2024, 17:11:08
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vj9p6s$t4fh$3@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
Sample_Init:
struct CmdClientData *cmdClientDataPtr;
cmdClientDataPtr = ckalloc(sizeof(struct Sha1ClientData));
-------------------------------------------^
Shouldn't this be "struct CmdClientDataPtr"?
Yes, good catch
cmdClientDataPtr->sha1CmdTolken = Tcl_CreateObjCommand(
interp, "sha1", (Tcl_ObjCmdProc *)Sha1_Cmd,
sha1ClientDataPtr, Sha1_CmdDeleteProc);
---------------^
Shouldn't this be "cmdClientDataPtr"?
Well, I use a client data for the command "sha1ClientDataPtr" with the command state, which is deleted by the command delete proc "Sha1_CmdDeleteProc".
In addition, there is assoc data of the dll "cmdClientDataPtr" to keep the command tokens for removal within the unload procedure.
Is this design sensible ?
THanks for all,
Harald