diff options
author | bch <brad.harder@gmail.com> | 2022-08-23 20:29:58 (GMT) |
---|---|---|
committer | bch <brad.harder@gmail.com> | 2022-08-23 20:29:58 (GMT) |
commit | abe4d4223da114bb82cca35dc22618f25847668f (patch) | |
tree | 0dc36206ccd4aedfad6569dd6cc28e2168712925 | |
parent | 176e98222e65668b47b1f0a105219a3610fee79e (diff) | |
download | tcl-abe4d4223da114bb82cca35dc22618f25847668f.zip tcl-abe4d4223da114bb82cca35dc22618f25847668f.tar.gz tcl-abe4d4223da114bb82cca35dc22618f25847668f.tar.bz2 |
fix(?) stray ckalloc()/ckfree(); ref TIP 494.
-rw-r--r-- | generic/tclBasic.c | 10 | ||||
-rw-r--r-- | generic/tclTrace.c | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 77756a4..eb3889d 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -2652,7 +2652,7 @@ static void cmdWrapperDeleteProc(void *clientData) { clientData = info->clientData; Tcl_CmdDeleteProc *deleteProc = info->deleteProc; - ckfree(info); + Tcl_Free(info); if (deleteProc != NULL) { deleteProc(clientData); } @@ -2675,7 +2675,7 @@ Tcl_CreateObjCommand2( * this command is deleted. */ ) { - CmdWrapperInfo *info = (CmdWrapperInfo *)ckalloc(sizeof(CmdWrapperInfo)); + CmdWrapperInfo *info = (CmdWrapperInfo *)Tcl_Alloc(sizeof(CmdWrapperInfo)); info->proc = proc; info->deleteProc = deleteProc; info->clientData = clientData; @@ -8410,7 +8410,7 @@ int wrapperNRObjProc( CmdWrapperInfo *info = (CmdWrapperInfo *)clientData; clientData = info->clientData; Tcl_ObjCmdProc2 *proc = info->proc; - ckfree(info); + Tcl_Free(info); return proc(clientData, interp, objc, objv); } @@ -8423,7 +8423,7 @@ Tcl_NRCallObjProc2( Tcl_Obj *const objv[]) { NRE_callback *rootPtr = TOP_CB(interp); - CmdWrapperInfo *info = (CmdWrapperInfo *)ckalloc(sizeof(CmdWrapperInfo)); + CmdWrapperInfo *info = (CmdWrapperInfo *)Tcl_Alloc(sizeof(CmdWrapperInfo)); info->clientData = clientData; info->proc = objProc; @@ -8489,7 +8489,7 @@ Tcl_NRCreateCommand2( /* If not NULL, gives a function to call when * this command is deleted. */ { - CmdWrapperInfo *info = (CmdWrapperInfo *)ckalloc(sizeof(CmdWrapperInfo)); + CmdWrapperInfo *info = (CmdWrapperInfo *)Tcl_Alloc(sizeof(CmdWrapperInfo)); info->proc = proc; info->nreProc = nreProc; info->deleteProc = deleteProc; diff --git a/generic/tclTrace.c b/generic/tclTrace.c index c837e92..f830a77 100644 --- a/generic/tclTrace.c +++ b/generic/tclTrace.c @@ -2152,7 +2152,7 @@ static void traceWrapperDelProc(void *clientData) if (info->delProc) { info->delProc(clientData); } - ckfree(info); + Tcl_Free(info); } Tcl_Trace @@ -2165,7 +2165,7 @@ Tcl_CreateObjTrace2( Tcl_CmdObjTraceDeleteProc *delProc) /* Function to call when trace is deleted */ { - TraceWrapperInfo *info = (TraceWrapperInfo *)ckalloc(sizeof(TraceWrapperInfo)); + TraceWrapperInfo *info = (TraceWrapperInfo *)Tcl_Alloc(sizeof(TraceWrapperInfo)); info->proc = proc; info->delProc = delProc; info->clientData = clientData; |