summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--generic/tclCmdIL.c6
-rw-r--r--generic/tclRegexp.c10
3 files changed, 17 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 8e47439..bd16f2b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,13 @@
+2008-10-04 Donal K. Fellows <dkf@users.sf.net>
+
+ * generic/tclCmdIL.c (InfoFrameCmd): Improved hygiene of result
+ * generic/tclRegexp.c (TclRegAbout): handling.
+
2008-10-04 Jan Nijtmans <nijtmans@users.sf.net>
- * generic/tclLoad.c: Make sure that any library which
- doesn't have an unloadproc is only really unloaded when
- no library code is executed yet. [Bug 2059262]
+ * generic/tclLoad.c: Make sure that any library which doesn't have an
+ unloadproc is only really unloaded when no library code is executed
+ yet. [Bug 2059262]
2008-10-04 Donal K. Fellows <dkf@users.sf.net>
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index d479f81..cffc0dd 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -16,7 +16,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdIL.c,v 1.158 2008/09/29 15:38:32 dgp Exp $
+ * RCS: @(#) $Id: tclCmdIL.c,v 1.159 2008/10/04 18:06:48 dkf Exp $
*/
#include "tclInt.h"
@@ -1082,8 +1082,8 @@ InfoFrameCmd(
if ((level > topLevel) || (level <= - topLevel)) {
levelError:
- Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "bad level \"",
- TclGetString(objv[1]), "\"", NULL);
+ Tcl_AppendResult(interp, "bad level \"", TclGetString(objv[1]), "\"",
+ NULL);
return TCL_ERROR;
}
diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c
index 23a1c97..c82b474 100644
--- a/generic/tclRegexp.c
+++ b/generic/tclRegexp.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclRegexp.c,v 1.28 2007/12/13 15:23:20 dgp Exp $
+ * RCS: @(#) $Id: tclRegexp.c,v 1.29 2008/10/04 18:06:48 dkf Exp $
*/
#include "tclInt.h"
@@ -656,7 +656,7 @@ TclRegAbout(
{0, NULL}
};
const struct infoname *inf;
- Tcl_Obj *infoObj;
+ Tcl_Obj *infoObj, *resultObj;
/*
* The reset here guarantees that the interpreter result is empty and
@@ -672,7 +672,8 @@ TclRegAbout(
* well and Tcl has other limits that constrain things as well...
*/
- Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp),
+ resultObj = Tcl_NewObj();
+ Tcl_ListObjAppendElement(NULL, resultObj,
Tcl_NewIntObj((int) regexpPtr->re.re_nsub));
/*
@@ -686,7 +687,8 @@ TclRegAbout(
Tcl_NewStringObj(inf->text, -1));
}
}
- Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), infoObj);
+ Tcl_ListObjAppendElement(NULL, resultObj, infoObj);
+ Tcl_SetObjResult(interp, resultObj);
return 0;
}