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 | 8e22eb240dbf4a13c6d6b5b8267751a3f860c51e (patch) | |
tree | 9c0e2a2eb71e34b866e450452627d96c4af9cd52 /generic/tkConfig.c | |
parent | 46e7eae0c2d02ec44e847b96dd0df9ebbcdce3ac (diff) | |
download | tk-8e22eb240dbf4a13c6d6b5b8267751a3f860c51e.zip tk-8e22eb240dbf4a13c6d6b5b8267751a3f860c51e.tar.gz tk-8e22eb240dbf4a13c6d6b5b8267751a3f860c51e.tar.bz2 |
Much more cleaning up of result handling.
Diffstat (limited to 'generic/tkConfig.c')
-rw-r--r-- | generic/tkConfig.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/generic/tkConfig.c b/generic/tkConfig.c index 51ac6dc..5d963d4 100644 --- a/generic/tkConfig.c +++ b/generic/tkConfig.c @@ -1158,7 +1158,8 @@ GetOptionFromObj( error: if (interp != NULL) { - Tcl_AppendResult(interp, "unknown option \"", name, "\"", NULL); + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "unknown option \"%s\"", name)); Tcl_SetErrorCode(interp, "TK", "LOOKUP", "OPTION", name, NULL); } return NULL; @@ -1226,9 +1227,9 @@ SetOptionFromAny( Tcl_Interp *interp, /* Used for error reporting if not NULL. */ register Tcl_Obj *objPtr) /* The object to convert. */ { - Tcl_AppendResult(interp, + Tcl_SetObjResult(interp, Tcl_NewStringObj( "can't convert value to option except via GetOptionFromObj API", - NULL); + -1)); Tcl_SetErrorCode(interp, "TK", "API_ABUSE", NULL); return TCL_ERROR; } @@ -1345,8 +1346,9 @@ Tk_SetOptions( if (objc < 2) { if (interp != NULL) { - Tcl_AppendResult(interp, "value for \"", - Tcl_GetStringFromObj(*objv, NULL), "\" missing",NULL); + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "value for \"%s\" missing", + Tcl_GetStringFromObj(*objv, NULL))); Tcl_SetErrorCode(interp, "TK", "VALUE_MISSING", NULL); goto error; } |