summaryrefslogtreecommitdiffstats
path: root/generic/tkRectOval.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2020-03-29 17:31:26 (GMT)
committerfvogel <fvogelnew1@free.fr>2020-03-29 17:31:26 (GMT)
commitc07206a21afa2200252c5ed91ec78821d5980aaf (patch)
treec37e2a002ced33aed7aac188a6a970ba6ed90171 /generic/tkRectOval.c
parent4956905e806f57e734630c226b4d52266414f671 (diff)
downloadtk-c07206a21afa2200252c5ed91ec78821d5980aaf.zip
tk-c07206a21afa2200252c5ed91ec78821d5980aaf.tar.gz
tk-c07206a21afa2200252c5ed91ec78821d5980aaf.tar.bz2
Fix [3134d697c8]: Reduce unnecessary code checks in canvas postscript code (patch from Emiliano Gavilan).
Diffstat (limited to 'generic/tkRectOval.c')
-rw-r--r--generic/tkRectOval.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/generic/tkRectOval.c b/generic/tkRectOval.c
index f40e788..a820411 100644
--- a/generic/tkRectOval.c
+++ b/generic/tkRectOval.c
@@ -1521,18 +1521,14 @@ RectOvalToPostscript(
Tcl_AppendObjToObj(psObj, pathObj);
Tcl_ResetResult(interp);
- if (Tk_CanvasPsColor(interp, canvas, fillColor) != TCL_OK) {
- goto error;
- }
+ Tk_CanvasPsColor(interp, canvas, fillColor);
Tcl_AppendObjToObj(psObj, Tcl_GetObjResult(interp));
if (fillStipple != None) {
Tcl_AppendToObj(psObj, "clip ", -1);
Tcl_ResetResult(interp);
- if (Tk_CanvasPsStipple(interp, canvas, fillStipple) != TCL_OK) {
- goto error;
- }
+ Tk_CanvasPsStipple(interp, canvas, fillStipple);
Tcl_AppendObjToObj(psObj, Tcl_GetObjResult(interp));
if (color != NULL) {
Tcl_AppendToObj(psObj, "grestore gsave\n", -1);
@@ -1551,10 +1547,7 @@ RectOvalToPostscript(
Tcl_AppendToObj(psObj, "0 setlinejoin 2 setlinecap\n", -1);
Tcl_ResetResult(interp);
- if (Tk_CanvasPsOutline(canvas, itemPtr,
- &rectOvalPtr->outline)!= TCL_OK) {
- goto error;
- }
+ Tk_CanvasPsOutline(canvas, itemPtr, &rectOvalPtr->outline);
Tcl_AppendObjToObj(psObj, Tcl_GetObjResult(interp));
}
@@ -1567,12 +1560,6 @@ RectOvalToPostscript(
Tcl_DecrRefCount(psObj);
Tcl_DecrRefCount(pathObj);
return TCL_OK;
-
- error:
- Tcl_DiscardInterpState(interpState);
- Tcl_DecrRefCount(psObj);
- Tcl_DecrRefCount(pathObj);
- return TCL_ERROR;
}
/*