From 50470ff69c686b80146a7badb279d510df112b9e Mon Sep 17 00:00:00 2001 From: "patthoyts@users.sourceforge.net" Date: Sat, 18 Oct 2008 11:26:20 +0000 Subject: Avoid const jiggling by using Tcl_SetObjResult --- generic/tkCanvas.c | 5 +++-- 1 file 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: { -- cgit v0.12