summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-02-23 13:59:49 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-02-23 13:59:49 (GMT)
commit42a533ea114536fc5140078428fa7714bbe3c504 (patch)
treee86dee07e46ac7dcdd7442925b9b2a679986c7d5 /generic
parent22d2441089751ab75a5d01ceb99f5fa3f21b1356 (diff)
parent96f8fc81311574307013ca7a6f4abc589600d848 (diff)
downloadtcl-42a533ea114536fc5140078428fa7714bbe3c504.zip
tcl-42a533ea114536fc5140078428fa7714bbe3c504.tar.gz
tcl-42a533ea114536fc5140078428fa7714bbe3c504.tar.bz2
merge trunk
Diffstat (limited to 'generic')
-rw-r--r--generic/tclEnv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclEnv.c b/generic/tclEnv.c
index 2cb240d..66ddb57 100644
--- a/generic/tclEnv.c
+++ b/generic/tclEnv.c
@@ -551,7 +551,8 @@ TclGetEnv(
* array.
*
* Results:
- * Always returns NULL to indicate success.
+ * Returns NULL to indicate success, or an error-message if the array
+ * element being handled doesn't exist.
*
* Side effects:
* Environment variable changes get propagated. If the whole "env" array
@@ -609,8 +610,7 @@ EnvTraceProc(
const char *value = TclGetEnv(name2, &valueString);
if (value == NULL) {
- Tcl_UnsetVar2(interp, name1, name2, 0);
- return NULL;
+ return (char *) "no such variable";
}
Tcl_SetVar2(interp, name1, name2, value, 0);
Tcl_DStringFree(&valueString);