diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-10-11 15:16:20 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-10-11 15:16:20 (GMT) |
commit | e5e9aa998d3fc89826a2546bf137cc70f70aa4ea (patch) | |
tree | 15722d33245c50858111f54d59fdf6cf40514732 /generic/tkSquare.c | |
parent | b70b51b1bea45124cf9ff403a61ca34930a6e55b (diff) | |
download | tk-e5e9aa998d3fc89826a2546bf137cc70f70aa4ea.zip tk-e5e9aa998d3fc89826a2546bf137cc70f70aa4ea.tar.gz tk-e5e9aa998d3fc89826a2546bf137cc70f70aa4ea.tar.bz2 |
Missed one simplification
Diffstat (limited to 'generic/tkSquare.c')
-rw-r--r-- | generic/tkSquare.c | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/generic/tkSquare.c b/generic/tkSquare.c index 8445930..9b70ba3 100644 --- a/generic/tkSquare.c +++ b/generic/tkSquare.c @@ -98,7 +98,6 @@ static const Tk_OptionSpec optionSpecs[] = { static void SquareDeletedProc(ClientData clientData); static int SquareConfigure(Tcl_Interp *interp, Square *squarePtr); -static Tcl_FreeProc SquareDestroy; static void SquareDisplay(ClientData clientData); static void KeepInWindow(Square *squarePtr); static void SquareObjEventProc(ClientData clientData, @@ -410,7 +409,7 @@ SquareObjEventProc( if (squarePtr->updatePending) { Tcl_CancelIdleCall(SquareDisplay, squarePtr); } - Tcl_EventuallyFree(squarePtr, SquareDestroy); + Tcl_EventuallyFree(squarePtr, TCL_DYNAMIC); } } @@ -537,33 +536,6 @@ SquareDisplay( /* *---------------------------------------------------------------------- * - * SquareDestroy -- - * - * This procedure is invoked by Tcl_EventuallyFree or Tcl_Release to - * clean up the internal structure of a square at a safe time (when - * no-one is using it anymore). - * - * Results: - * None. - * - * Side effects: - * Everything associated with the square is freed up. - * - *---------------------------------------------------------------------- - */ - -static void -SquareDestroy( - void *memPtr) /* Info about square widget. */ -{ - Square *squarePtr = memPtr; - - ckfree(squarePtr); -} - -/* - *---------------------------------------------------------------------- - * * KeepInWindow -- * * Adjust the position of the square if necessary to keep it in the |