summaryrefslogtreecommitdiffstats
path: root/generic/tclMain.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2024-05-25 11:31:34 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2024-05-25 11:31:34 (GMT)
commit52e0863e247b040ad4634a2d76fb635864cc03f7 (patch)
tree85bd4b4de6b75b87ec304abeaf5c555a46c78a3e /generic/tclMain.c
parentdfbb9a77ad9a9998eaed2cc0b70254f3ae7bfe65 (diff)
downloadtcl-52e0863e247b040ad4634a2d76fb635864cc03f7.zip
tcl-52e0863e247b040ad4634a2d76fb635864cc03f7.tar.gz
tcl-52e0863e247b040ad4634a2d76fb635864cc03f7.tar.bz2
Use the new operations
Diffstat (limited to 'generic/tclMain.c')
-rw-r--r--generic/tclMain.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/generic/tclMain.c b/generic/tclMain.c
index 4f31924..d2ab04a 100644
--- a/generic/tclMain.c
+++ b/generic/tclMain.c
@@ -405,13 +405,9 @@ Tcl_MainEx(
chan = Tcl_GetStdChannel(TCL_STDERR);
if (chan) {
Tcl_Obj *options = Tcl_GetReturnOptions(interp, code);
- Tcl_Obj *keyPtr, *valuePtr;
-
- TclNewLiteralStringObj(keyPtr, "-errorinfo");
- Tcl_IncrRefCount(keyPtr);
- Tcl_DictObjGet(NULL, options, keyPtr, &valuePtr);
- Tcl_DecrRefCount(keyPtr);
+ Tcl_Obj *valuePtr = NULL;
+ TclDictGet(NULL, options, "-errorinfo", &valuePtr);
if (valuePtr) {
Tcl_WriteObj(chan, valuePtr);
}