diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2008-10-18 11:26:20 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2008-10-18 11:26:20 (GMT) |
commit | bcf7fd1a54e31d4921b57dff7aa66ff154d6e4f5 (patch) | |
tree | 9b90a24802e0bf08bd23beeffcf8d3a8cc3cd0de | |
parent | f9bdfaa967982fbe680e45cd3a3f9873a71ebe8f (diff) | |
download | tk-bcf7fd1a54e31d4921b57dff7aa66ff154d6e4f5.zip tk-bcf7fd1a54e31d4921b57dff7aa66ff154d6e4f5.tar.gz tk-bcf7fd1a54e31d4921b57dff7aa66ff154d6e4f5.tar.bz2 |
Avoid const jiggling by using Tcl_SetObjResult
-rw-r--r-- | generic/tkCanvas.c | 5 |
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: { |