From c5abbcaaf4c32c6bfce25ff1a589f6e704116729 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 7 Mar 2019 22:13:25 +0000 Subject: In the 8.6.* releases, Tcl_GetStringResult() still passes through interp->result. Have to ask specifically for the string rep of the value we want. --- generic/tclPkg.c | 4 ++-- generic/tclTestProcBodyObj.c | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/generic/tclPkg.c b/generic/tclPkg.c index 510f5e6..c1e2078 100644 --- a/generic/tclPkg.c +++ b/generic/tclPkg.c @@ -316,7 +316,7 @@ Tcl_PkgRequireEx( if (version == NULL) { if (Tcl_PkgRequireProc(interp, name, 0, NULL, clientDataPtr) == TCL_OK) { - result = Tcl_GetStringResult(interp); + result = Tcl_GetString(Tcl_GetObjResult(interp)); Tcl_ResetResult(interp); } } else { @@ -330,7 +330,7 @@ Tcl_PkgRequireEx( } Tcl_IncrRefCount(ov); if (Tcl_PkgRequireProc(interp, name, 1, &ov, clientDataPtr) == TCL_OK) { - result = Tcl_GetStringResult(interp); + result = Tcl_GetString(Tcl_GetObjResult(interp)); Tcl_ResetResult(interp); } TclDecrRefCount(ov); diff --git a/generic/tclTestProcBodyObj.c b/generic/tclTestProcBodyObj.c index de1fa52..fba2844 100644 --- a/generic/tclTestProcBodyObj.c +++ b/generic/tclTestProcBodyObj.c @@ -340,8 +340,6 @@ ProcBodyTestCheckObjCmd( } version = Tcl_PkgPresent(interp, packageName, packageVersion, 1); -fprintf(stdout, "CHECK %p '%s' %p '%s'\n", version, version, -packageVersion, packageVersion); fflush(stdout); Tcl_SetObjResult(interp, Tcl_NewBooleanObj( strcmp(version, packageVersion) == 0)); return TCL_OK; -- cgit v0.12