diff options
| author | donal.k.fellows@manchester.ac.uk <dkf> | 2011-08-05 15:23:55 (GMT) |
|---|---|---|
| committer | donal.k.fellows@manchester.ac.uk <dkf> | 2011-08-05 15:23:55 (GMT) |
| commit | 33cff6e3a9f7dd0e89384f7aa9d2d99e270a837b (patch) | |
| tree | 8d196c86a7bd506d332c9e4b0da126e6f2ed45fd /generic/tclAssembly.c | |
| parent | 26afde2c7945fd64334525c75db2921a6ac8e1c9 (diff) | |
| download | tcl-33cff6e3a9f7dd0e89384f7aa9d2d99e270a837b.zip tcl-33cff6e3a9f7dd0e89384f7aa9d2d99e270a837b.tar.gz tcl-33cff6e3a9f7dd0e89384f7aa9d2d99e270a837b.tar.bz2 | |
Use Tcl_PrintfObj to generate more (complex) error messages.
Diffstat (limited to 'generic/tclAssembly.c')
| -rw-r--r-- | generic/tclAssembly.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c index eca934f..f45ae07 100644 --- a/generic/tclAssembly.c +++ b/generic/tclAssembly.c @@ -2292,15 +2292,12 @@ CheckNamespaceQualifiers( const char* name, /* Variable name to check */ int nameLen) /* Length of the variable */ { - Tcl_Obj* result; /* Error message */ const char* p; for (p = name; p+2 < name+nameLen; p++) { if ((*p == ':') && (p[1] == ':')) { - result = Tcl_NewStringObj("variable \"", -1); - Tcl_AppendToObj(result, name, -1); - Tcl_AppendToObj(result, "\" is not local", -1); - Tcl_SetObjResult(interp, result); + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "variable \"%s\" is not local", name)); Tcl_SetErrorCode(interp, "TCL", "ASSEM", "NONLOCAL", name, NULL); return TCL_ERROR; } |
