diff options
author | dgp <dgp@users.sourceforge.net> | 2002-01-04 16:39:57 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2002-01-04 16:39:57 (GMT) |
commit | 6657ca47c35d6a7bfe5a649f802af2e272054b1b (patch) | |
tree | f01ad542f1598dade58c3e2eed580e4e7426b7ec | |
parent | c91bf4b18dbe3af35fca870417401cdb66be28a6 (diff) | |
download | tk-6657ca47c35d6a7bfe5a649f802af2e272054b1b.zip tk-6657ca47c35d6a7bfe5a649f802af2e272054b1b.tar.gz tk-6657ca47c35d6a7bfe5a649f802af2e272054b1b.tar.bz2 |
* generic/tkBind.c (TkBindFree):
* generic/tkGrid.c (Tk_GridCmd,ResolveConstraints,CheckSlotData,
DestroyGrid):
* generic/tkSelect.c (Tk_DeleteSelHandler,TkSelDeadWindow): Replaced
Tcl_Free calls with ckfree so that memory debugging is fully supported.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | generic/tkBind.c | 4 | ||||
-rw-r--r-- | generic/tkGrid.c | 38 | ||||
-rw-r--r-- | generic/tkSelect.c | 6 |
4 files changed, 32 insertions, 24 deletions
@@ -1,3 +1,11 @@ +2002-01-04 Don Porter <dgp@users.sourceforge.net> + + * generic/tkBind.c (TkBindFree): + * generic/tkGrid.c (Tk_GridCmd,ResolveConstraints,CheckSlotData, + DestroyGrid): + * generic/tkSelect.c (Tk_DeleteSelHandler,TkSelDeadWindow): Replaced + Tcl_Free calls with ckfree so that memory debugging is fully supported. + 2001-12-18 Don Porter <dgp@users.sourceforge.net> * tests/event.test (event-click-drag-1.2): Corrected test that diff --git a/generic/tkBind.c b/generic/tkBind.c index 20b135c..c44b44f 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkBind.c,v 1.13.2.2 2001/10/13 01:25:10 hobbs Exp $ + * RCS: @(#) $Id: tkBind.c,v 1.13.2.3 2002/01/04 16:39:57 dgp Exp $ */ #include "tkPort.h" @@ -809,7 +809,7 @@ TkBindFree(mainPtr) bindInfoPtr = (BindInfo *) mainPtr->bindInfo; DeleteVirtualEventTable(&bindInfoPtr->virtualEventTable); bindInfoPtr->deleted = 1; - Tcl_EventuallyFree((ClientData) bindInfoPtr, Tcl_Free); + Tcl_EventuallyFree((ClientData) bindInfoPtr, TCL_DYNAMIC); mainPtr->bindInfo = NULL; } diff --git a/generic/tkGrid.c b/generic/tkGrid.c index ca74265..de67a88 100644 --- a/generic/tkGrid.c +++ b/generic/tkGrid.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkGrid.c,v 1.9 2000/04/17 17:40:27 ericm Exp $ + * RCS: @(#) $Id: tkGrid.c,v 1.9.2.1 2002/01/04 16:39:57 dgp Exp $ */ #include "tkInt.h" @@ -735,12 +735,12 @@ Tk_GridCmd(clientData, interp, argc, argv) if (checkOnly && argcPtr > 1) { Tcl_AppendResult(interp, argv[3], " must be a single element.", (char *) NULL); - Tcl_Free((char *)argvPtr); + ckfree((char *)argvPtr); return TCL_ERROR; } for (indexP=argvPtr; *indexP != NULL; indexP++) { if (Tcl_GetInt(interp, *indexP, &slot) != TCL_OK) { - Tcl_Free((char *)argvPtr); + ckfree((char *)argvPtr); return TCL_ERROR; } ok = CheckSlotData(masterPtr, slot, slotType, checkOnly); @@ -748,7 +748,7 @@ Tk_GridCmd(clientData, interp, argc, argv) Tcl_AppendResult(interp, argv[0], " ", argv[1], ": \"", *argvPtr,"\" is out of range", (char *) NULL); - Tcl_Free((char *)argvPtr); + ckfree((char *)argvPtr); return TCL_ERROR; } else if (ok == TCL_OK) { slotPtr = (slotType == COLUMN) ? @@ -762,7 +762,7 @@ Tk_GridCmd(clientData, interp, argc, argv) */ if (argc == 4) { - Tcl_Free((char *)argvPtr); + ckfree((char *)argvPtr); } if ((argc == 4) && (ok == TCL_OK)) { char buf[64 + TCL_INTEGER_SPACE * 3]; @@ -790,7 +790,7 @@ Tk_GridCmd(clientData, interp, argc, argv) Tcl_AppendResult(interp, "invalid arg \"", argv[i], "\" :expecting -minsize, -pad, or -weight.", (char *) NULL); - Tcl_Free((char *)argvPtr); + ckfree((char *)argvPtr); return TCL_ERROR; } if (strncmp(argv[i], "-minsize", length) == 0) { @@ -803,7 +803,7 @@ Tk_GridCmd(clientData, interp, argc, argv) Tcl_SetResult(interp, buf, TCL_VOLATILE); } else if (Tk_GetPixels(interp, master, argv[i+1], &size) != TCL_OK) { - Tcl_Free((char *)argvPtr); + ckfree((char *)argvPtr); return TCL_ERROR; } else { slotPtr[slot].minSize = size; @@ -819,12 +819,12 @@ Tk_GridCmd(clientData, interp, argc, argv) sprintf(buf, "%d", value); Tcl_SetResult(interp, buf, TCL_VOLATILE); } else if (Tcl_GetInt(interp, argv[i+1], &wt) != TCL_OK) { - Tcl_Free((char *)argvPtr); + ckfree((char *)argvPtr); return TCL_ERROR; } else if (wt < 0) { Tcl_AppendResult(interp, "invalid arg \"", argv[i], "\": should be non-negative", (char *) NULL); - Tcl_Free((char *)argvPtr); + ckfree((char *)argvPtr); return TCL_ERROR; } else { slotPtr[slot].weight = wt; @@ -840,12 +840,12 @@ Tk_GridCmd(clientData, interp, argc, argv) Tcl_SetResult(interp, buf, TCL_VOLATILE); } else if (Tk_GetPixels(interp, master, argv[i+1], &size) != TCL_OK) { - Tcl_Free((char *)argvPtr); + ckfree((char *)argvPtr); return TCL_ERROR; } else if (size < 0) { Tcl_AppendResult(interp, "invalid arg \"", argv[i], "\": should be non-negative", (char *) NULL); - Tcl_Free((char *)argvPtr); + ckfree((char *)argvPtr); return TCL_ERROR; } else { slotPtr[slot].pad = size; @@ -854,12 +854,12 @@ Tk_GridCmd(clientData, interp, argc, argv) Tcl_AppendResult(interp, "invalid arg \"", argv[i], "\": expecting -minsize, -pad, or -weight.", (char *) NULL); - Tcl_Free((char *)argvPtr); + ckfree((char *)argvPtr); return TCL_ERROR; } } } - Tcl_Free((char *)argvPtr); + ckfree((char *)argvPtr); /* * If we changed a property, re-arrange the table, @@ -1707,7 +1707,7 @@ ResolveConstraints(masterPtr, slotType, maxOffset) --layoutPtr; if (layoutPtr != layoutData) { - Tcl_Free((char *)layoutPtr); + ckfree((char *)layoutPtr); } return requiredSize; } @@ -1886,7 +1886,7 @@ CheckSlotData(masterPtr, slot, slotType, checkOnly) masterPtr->masterDataPtr->columnPtr; memcpy((VOID *) new, (VOID *) old, oldSize ); memset((VOID *) (new+numSlot), 0, newSize - oldSize ); - Tcl_Free((char *) old); + ckfree((char *) old); if (slotType == ROW) { masterPtr->masterDataPtr->rowPtr = new ; masterPtr->masterDataPtr->rowSpace = newNumSlot ; @@ -2037,14 +2037,14 @@ DestroyGrid(memPtr) if (gridPtr->masterDataPtr != NULL) { if (gridPtr->masterDataPtr->rowPtr != NULL) { - Tcl_Free((char *) gridPtr->masterDataPtr -> rowPtr); + ckfree((char *) gridPtr->masterDataPtr -> rowPtr); } if (gridPtr->masterDataPtr->columnPtr != NULL) { - Tcl_Free((char *) gridPtr->masterDataPtr -> columnPtr); + ckfree((char *) gridPtr->masterDataPtr -> columnPtr); } - Tcl_Free((char *) gridPtr->masterDataPtr); + ckfree((char *) gridPtr->masterDataPtr); } - Tcl_Free((char *) gridPtr); + ckfree((char *) gridPtr); } /* diff --git a/generic/tkSelect.c b/generic/tkSelect.c index b6061ad..8d7c929 100644 --- a/generic/tkSelect.c +++ b/generic/tkSelect.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkSelect.c,v 1.5 1999/08/13 17:52:13 redman Exp $ + * RCS: @(#) $Id: tkSelect.c,v 1.5.8.1 2002/01/04 16:39:57 dgp Exp $ */ #include "tkInt.h" @@ -253,7 +253,7 @@ Tk_DeleteSelHandler(tkwin, selection, target) */ ((CommandInfo*)selPtr->clientData)->interp = NULL; - Tcl_EventuallyFree(selPtr->clientData, Tcl_Free); + Tcl_EventuallyFree(selPtr->clientData, TCL_DYNAMIC); } ckfree((char *) selPtr); } @@ -1007,7 +1007,7 @@ TkSelDeadWindow(winPtr) */ ((CommandInfo*)selPtr->clientData)->interp = NULL; - Tcl_EventuallyFree(selPtr->clientData, Tcl_Free); + Tcl_EventuallyFree(selPtr->clientData, TCL_DYNAMIC); } ckfree((char *) selPtr); } |