summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvas.c
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2008-10-18 11:26:20 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2008-10-18 11:26:20 (GMT)
commitbcf7fd1a54e31d4921b57dff7aa66ff154d6e4f5 (patch)
tree9b90a24802e0bf08bd23beeffcf8d3a8cc3cd0de /generic/tkCanvas.c
parentf9bdfaa967982fbe680e45cd3a3f9873a71ebe8f (diff)
downloadtk-bcf7fd1a54e31d4921b57dff7aa66ff154d6e4f5.zip
tk-bcf7fd1a54e31d4921b57dff7aa66ff154d6e4f5.tar.gz
tk-bcf7fd1a54e31d4921b57dff7aa66ff154d6e4f5.tar.bz2
Avoid const jiggling by using Tcl_SetObjResult
Diffstat (limited to 'generic/tkCanvas.c')
-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: {