Tcl_VarEval returns successfully, set interp->errorLine to 1
Closed / Fixed218085ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:53:00
OriginalBugID: 1718 Bug
Version: 8.0.4
SubmitDate: '1999-04-05'
LastModified: '1999-12-03'
Severity: LOW
Status: Closed
Submitter: pat
ChangedBy: hobbs
OS: Solaris
OSVersion: 4.5.3
FixedDate: '2000-10-25'
FixedInVersion: NA
ClosedDate: '1999-12-03'
Name: Scott Sussman
ReproducibleScript:
interp->errorLine = 0;
result = Tcl_VarEval(interp, "return \"",
event->func->arglist->value.strv, "\"", 0);
if (interp->errorLine) result = TCL_ERROR;
using the above code result gets set to 2 (event->func->arglist->value.strv is a string i.e. "ENET_HDR", so the entire string sent to tcl_VarEval is
'return \"ENET_HDR\"') which is correct (TCL_RETURN) yet the interp->errorLine get set to 1 and the following if forces the value of result to TCL_ERROR. the fix for us was to use the Tcl_VarEval return value to check for pass or fail rather than interp->errorLine. Is this a known problem?
Thanks,
Scott Sussman
Walts Develpment Group Leader
Bay Networks
The return value is the documented way to determine an error,
and the other is strongly discouraged (not guaranteed to be
upwards compatible).
-- 12/03/1999 hobbs
welch Closed ticket [218085ffff].
[History diff]2000-10-26 08:14:46
dgp Ticket [218085ffff]: 3 changes
[History diff]2001-04-16 23:38:03
Log in (anonymous is fine) to add a comment.