diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-12-08 21:40:26 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-12-08 21:40:26 (GMT) |
commit | 162bc9009b5d9598929c94e05adecc5fdb24eba9 (patch) | |
tree | 6321c171fe8000e3d0b37e076a8302dc26a166b3 /generic | |
parent | d03191c8b44d66478a9a88c9d5c9bec9976dc016 (diff) | |
download | tk-162bc9009b5d9598929c94e05adecc5fdb24eba9.zip tk-162bc9009b5d9598929c94e05adecc5fdb24eba9.tar.gz tk-162bc9009b5d9598929c94e05adecc5fdb24eba9.tar.bz2 |
Remove unnecessary TkGetStringsFromObjs() usage
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkCanvas.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index c77d33e..1cc843e 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -257,7 +257,9 @@ static int FindItems(Tcl_Interp *interp, TkCanvas *canvasPtr, static int FindArea(Tcl_Interp *interp, TkCanvas *canvasPtr, Tcl_Obj *const *objv, Tk_Uid uid, int enclosed); static double GridAlign(double coord, double spacing); +#if !defined(TK_NO_DEPRECATED) && (TK_MAJOR_VERSION < 9) static const char** TkGetStringsFromObjs(int objc, Tcl_Obj *const *objv); +#endif static void InitCanvas(void); static void PickCurrentItem(TkCanvas *canvasPtr, XEvent *eventPtr); static Tcl_Obj * ScrollFractions(int screen1, @@ -2093,7 +2095,6 @@ CanvasWidgetCmd( int newX = 0; /* Initialization needed only to prevent gcc * warnings. */ double fraction; - const char **args; if (objc == 2) { Tcl_SetObjResult(interp, ScrollFractions( @@ -2104,11 +2105,7 @@ CanvasWidgetCmd( break; } - args = TkGetStringsFromObjs(objc, objv); type = Tk_GetScrollInfoObj(interp, objc, objv, &fraction, &count); - if (args != NULL) { - ckfree(args); - } switch (type) { case TK_SCROLL_MOVETO: newX = canvasPtr->scrollX1 - canvasPtr->inset @@ -2139,7 +2136,6 @@ CanvasWidgetCmd( int newY = 0; /* Initialization needed only to prevent gcc * warnings. */ double fraction; - const char **args; if (objc == 2) { Tcl_SetObjResult(interp, ScrollFractions( @@ -2150,11 +2146,7 @@ CanvasWidgetCmd( break; } - args = TkGetStringsFromObjs(objc, objv); type = Tk_GetScrollInfoObj(interp, objc, objv, &fraction, &count); - if (args != NULL) { - ckfree(args); - } switch (type) { case TK_SCROLL_MOVETO: newY = canvasPtr->scrollY1 - canvasPtr->inset + (int) ( @@ -6106,6 +6098,7 @@ CanvasSetOrigin( *---------------------------------------------------------------------- */ +#if !defined(TK_NO_DEPRECATED) && (TK_MAJOR_VERSION < 9) static const char ** TkGetStringsFromObjs( int objc, @@ -6124,6 +6117,7 @@ TkGetStringsFromObjs( argv[objc] = 0; return argv; } +#endif /* *-------------------------------------------------------------- |