summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatthoyts@users.sourceforge.net <patthoyts>2008-10-18 11:26:20 (GMT)
committerpatthoyts@users.sourceforge.net <patthoyts>2008-10-18 11:26:20 (GMT)
commit50470ff69c686b80146a7badb279d510df112b9e (patch)
tree9b90a24802e0bf08bd23beeffcf8d3a8cc3cd0de
parent1cc08bb263130bcf88e80f28fee1566d82e8483b (diff)
downloadtk-50470ff69c686b80146a7badb279d510df112b9e.zip
tk-50470ff69c686b80146a7badb279d510df112b9e.tar.gz
tk-50470ff69c686b80146a7badb279d510df112b9e.tar.bz2
Avoid const jiggling by using Tcl_SetObjResult
-rw-r--r--generic/tkCanvas.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index 423167b..efe8ac3 100644
--- a/generic/tkCanvas.c
+++ b/generic/tkCanvas.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkCanvas.c,v 1.53 2008/10/17 23:18:37 nijtmans Exp $
+ * RCS: @(#) $Id: tkCanvas.c,v 1.54 2008/10/18 11:26:20 patthoyts Exp $
*/
/* #define USE_OLD_TAG_SEARCH 1 */
@@ -1762,7 +1762,8 @@ CanvasWidgetCmd(
}
FIRST_CANVAS_ITEM_MATCHING(objv[2], &searchPtr, goto done);
if (itemPtr != NULL) {
- Tcl_SetResult(interp, itemPtr->typePtr->name, TCL_STATIC);
+ Tcl_SetObjResult(interp,
+ Tcl_NewStringObj(itemPtr->typePtr->name, -1));
}
break;
case CANV_XVIEW: {