Overview
| Artifact ID: | b827c1c7526002fff01291bee2e29110a5c5c46c |
|---|---|
| Ticket: | 218161ffffffffffffffffffffffffffffffffff
Tcl_EvalFile() returns empty result string |
| User & Date: | nobody on 2000-10-26 00:53:56 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
OriginalBugID: 2205 Bug Version: 8.0.5 SubmitDate: '1999-06-11' LastModified: '1999-11-07' Severity: SER Status: Closed Submitter: techsupp ChangedBy: hobbs OS: Other OSVersion: UnixWare (Intel) Machine: NA FixedDate: '2000-10-25' ClosedDate: '1999-11-07' Name: David Bradsher CustomShell: none ReproducibleScript: # script breaks here return 1 -------------------- C pgm: char interp_res[256]; . . if ( Tcl_EvalFile( mp_tcl_interp, p_filename ) != TCL_OK ) { . . } strcpy( interp_val, mp_tcl_interp->result ); return( atoi( interp_val ) ); ObservedBehavior: The C application had been working while linked to version 7.4 of the Tcl libraries. For the above instance, the C routine would return an integer '1' when the script terminated normally with "return 1". With 8.0.5, the result string has length 0, which atoi() translates to '0'. DesiredBehavior: The return from Tcl_EvalFile() should be the same as with version 7.4. The desired behavior for this is misguided due to the fact that 8.0 uses Tcl_Obj's throughout. It is likely in this case that the result from Tcl_EvalFile, if 1, will be stored in the result as an Tcl integer object, and thus 'result' char* will be empty until it is requested as a string. This is noted in the porting docs. The user should use Tcl_GetStringResult, which works in Tcl7 and Tcl8. -- 11/07/1999 hobbs - foundin changed to: "final: 8.0.5"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "69. Other"
- title changed to: "Tcl_EvalFile() returns empty result string"
- type changed to: "Bug"