diff options
author | donal.k.fellows@manchester.ac.uk <dkf> | 2012-07-23 13:59:40 (GMT) |
---|---|---|
committer | donal.k.fellows@manchester.ac.uk <dkf> | 2012-07-23 13:59:40 (GMT) |
commit | d1cd6dbdfa789aff7ff48e5d155cc8cba7abbeb8 (patch) | |
tree | 46a3064598e4a36c7ca561f9c08f5d22de4b2b9e /generic/tkCanvText.c | |
parent | 6c4410183fc1d8dd6ba26d2428abfd718850c246 (diff) | |
download | tk-d1cd6dbdfa789aff7ff48e5d155cc8cba7abbeb8.zip tk-d1cd6dbdfa789aff7ff48e5d155cc8cba7abbeb8.tar.gz tk-d1cd6dbdfa789aff7ff48e5d155cc8cba7abbeb8.tar.bz2 |
Much more cleaning up of result handling.
Diffstat (limited to 'generic/tkCanvText.c')
-rw-r--r-- | generic/tkCanvText.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/generic/tkCanvText.c b/generic/tkCanvText.c index a225646..cda9b1c 100644 --- a/generic/tkCanvText.c +++ b/generic/tkCanvText.c @@ -1359,7 +1359,8 @@ GetTextIndex( } else if ((c == 's') && (length >= 5) && (strncmp(string, "sel.first", (unsigned) length) == 0)) { if (textInfoPtr->selItemPtr != itemPtr) { - Tcl_SetResult(interp, "selection isn't in item", TCL_STATIC); + Tcl_SetObjResult(interp, Tcl_NewStringObj( + "selection isn't in item", -1)); Tcl_SetErrorCode(interp, "TK", "CANVAS", "UNSELECTED", NULL); return TCL_ERROR; } @@ -1367,7 +1368,8 @@ GetTextIndex( } else if ((c == 's') && (length >= 5) && (strncmp(string, "sel.last", (unsigned) length) == 0)) { if (textInfoPtr->selItemPtr != itemPtr) { - Tcl_SetResult(interp, "selection isn't in item", TCL_STATIC); + Tcl_SetObjResult(interp, Tcl_NewStringObj( + "selection isn't in item", -1)); Tcl_SetErrorCode(interp, "TK", "CANVAS", "UNSELECTED", NULL); return TCL_ERROR; } |