sample extension: how to beam created proc tolkens to unload procedure

Liste des GroupesRevenir à cl tcl 
Sujet : sample extension: how to beam created proc tolkens to unload procedure
De : wortkarg3 (at) *nospam* yahoo.com (Harald Oehlmann)
Groupes : comp.lang.tcl
Date : 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/2c5e0e025efd0b9f
The 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

Date Sujet#  Auteur
10 Dec 24 * sample extension: how to beam created proc tolkens to unload procedure9Harald Oehlmann
10 Dec 24 `* Re: sample extension: how to beam created proc tolkens to unload procedure8Emiliano
10 Dec 24  +- Re: sample extension: how to beam created proc tolkens to unload procedure1Harald Oehlmann
10 Dec 24  +* Re: sample extension: how to beam created proc tolkens to unload procedure5Harald Oehlmann
10 Dec 24  i`* Re: sample extension: how to beam created proc tolkens to unload procedure4Emiliano
10 Dec 24  i +* Re: sample extension: how to beam created proc tolkens to unload procedure2Harald Oehlmann
10 Dec 24  i i`- Re: sample extension: how to beam created proc tolkens to unload procedure1Ralf Fassel
10 Dec 24  i `- Re: sample extension: how to beam created proc tolkens to unload procedure1Harald Oehlmann
11 Dec 24  `- Re: sample extension: how to beam created proc tolkens to unload procedure1Harald Oehlmann

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal