Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: b827c1c7526002fff01291bee2e29110a5c5c46c
Ticket: 218161ffffffffffffffffffffffffffffffffff
Tcl_EvalFile() returns empty result string
User & Date: nobody on 2000-10-26 00:53:56
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. 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
    
  4. foundin changed to: "final: 8.0.5"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to: "Tcl_EvalFile() returns empty result string"
  11. type changed to: "Bug"