summaryrefslogtreecommitdiffstats
path: root/generic/tkConfig.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2008-10-05 18:22:21 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2008-10-05 18:22:21 (GMT)
commit501d0b1523e4a2b370c58cd262bbed99725a5ab1 (patch)
tree57b5f8cd5ff8ef866da62495bc435946f4655c50 /generic/tkConfig.c
parent291d618cfb6ad5e935244599abbf1bdb93a284fc (diff)
downloadtk-501d0b1523e4a2b370c58cd262bbed99725a5ab1.zip
tk-501d0b1523e4a2b370c58cd262bbed99725a5ab1.tar.gz
tk-501d0b1523e4a2b370c58cd262bbed99725a5ab1.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.c11
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;
}
}