Harald Oehlmann
2024-12-10 09:35:46 UTC
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
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