Sujet : 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, 10:35:46
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vj921g$t4fh$1@dont-email.me>
User-Agent : Mozilla Thunderbird
Hi Wizards,
I am soooo desperate with the sample extension.
Standard functionality like the build-info and the dll unload feels so complicated. How can we put all this burden to the poor extension developpers?
Ok, enough moaning !
See here:
https://core.tcl-lang.org/sampleextension/info/2c5e0e025efd0b9fThe two commands sha1 and ::sha1::build-info are created in the init procedure.
They have to be deleted in the unload procedure.
How do I beam the two "tolkens" to the unload procedure ?
struct CmdClientData {
Tcl_Command sha1CmdTolken;
};
Sample_Init:
struct CmdClientData *cmdClientDataPtr;
cmdClientDataPtr = ckalloc(sizeof(struct Sha1ClientData));
cmdClientDataPtr->sha1CmdTolken = Tcl_CreateObjCommand(
interp, "sha1", (Tcl_ObjCmdProc *)Sha1_Cmd,
sha1ClientDataPtr, Sha1_CmdDeleteProc);
Sample_Unload:
??? How to get cmdClientDataPtr access here ???
Tcl_DeleteCommandFromToken(interp, cmdClientDataPtr->sha1CmdTolken);
ckfree(cmdClientDataPtr);
---
And of cause, the git magic is not working for build-info - it does not build any more without git - info how this may work is nowhere...
But that is the next step.
Thanks for any idea!
Harald