summaryrefslogtreecommitdiffstats
path: root/generic/tclRegexp.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2008-10-04 18:06:47 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2008-10-04 18:06:47 (GMT)
commit1b5fe3d675d4cc34efc61475912cff429a755b5b (patch)
tree5028aa392a5b1beb865716491aac742846558ad0 /generic/tclRegexp.c
parente0670e6da0fa957eff9b3e856c65fcd41eb9c711 (diff)
downloadtcl-1b5fe3d675d4cc34efc61475912cff429a755b5b.zip
tcl-1b5fe3d675d4cc34efc61475912cff429a755b5b.tar.gz
tcl-1b5fe3d675d4cc34efc61475912cff429a755b5b.tar.bz2
More result hygiene.
Diffstat (limited to 'generic/tclRegexp.c')
-rw-r--r--generic/tclRegexp.c10
1 files changed, 6 insertions, 4 deletions
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;
}