diff options
author | donal.k.fellows@manchester.ac.uk <dkf> | 2008-10-05 18:22:21 (GMT) |
---|---|---|
committer | donal.k.fellows@manchester.ac.uk <dkf> | 2008-10-05 18:22:21 (GMT) |
commit | a21256d499833c2885e43967cf77be2934dad4e6 (patch) | |
tree | 57b5f8cd5ff8ef866da62495bc435946f4655c50 /generic/tkConfig.c | |
parent | 112dd0c62b3fffdeb03e0be53a9dea3920e59f27 (diff) | |
download | tk-a21256d499833c2885e43967cf77be2934dad4e6.zip tk-a21256d499833c2885e43967cf77be2934dad4e6.tar.gz tk-a21256d499833c2885e43967cf77be2934dad4e6.tar.bz2 |
Greatly clean up Tk's handling of the writability of the Tcl result object.
Diffstat (limited to 'generic/tkConfig.c')
-rw-r--r-- | generic/tkConfig.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/generic/tkConfig.c b/generic/tkConfig.c index 5521615..8482871 100644 --- a/generic/tkConfig.c +++ b/generic/tkConfig.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkConfig.c,v 1.27 2008/04/27 22:38:55 dkf Exp $ + * RCS: @(#) $Id: tkConfig.c,v 1.28 2008/10/05 18:22:21 dkf Exp $ */ /* @@ -1223,9 +1223,9 @@ SetOptionFromAny( Tcl_Interp *interp, /* Used for error reporting if not NULL. */ register Tcl_Obj *objPtr) /* The object to convert. */ { - Tcl_AppendToObj(Tcl_GetObjResult(interp), + Tcl_AppendResult(interp, "can't convert value to option except via GetOptionFromObj API", - -1); + NULL); return TCL_ERROR; } @@ -1306,9 +1306,8 @@ Tk_SetOptions( if (objc < 2) { if (interp != NULL) { - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), - "value for \"", Tcl_GetStringFromObj(*objv, NULL), - "\" missing", NULL); + Tcl_AppendResult(interp, "value for \"", + Tcl_GetStringFromObj(*objv, NULL), "\" missing",NULL); goto error; } } |