Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 8248eb91ff5078af0b3212d0c693c1e8571b01b3
Ticket: 1209759fffffffffffffffffffffffffffffffff
TclUpdateReturnInfo() panics when returning TCL_RETURN
User & Date: uring on 2005-05-27 10:56:33
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    
    Have a command, say "ret", which returns the code
    TCL_RETURN, for example as a proc:
    
    proc ret {} { return -code 2 }
    
    ... and a procedure which calls "ret":
    
    Then, running tclsh you get:
    
    % catch ret
    % 2
    % ret
    % foo
    
    But, if you implement the "ret" command in C, for example,
    
    static int
    ret_cmd( ClientData, Tcl_Interp * interp, int, Tcl_Obj
    * const * )
    {
        return TCL_RETURN;
    }
    
    you'll get tclsh oborting:
    
    % load libret.so ;# creates the "ret" command 
    % proc foo {} { ret }
    % catch ret
    % 2
    % foo
    TclUpdateReturnInfo: negative return level
    
    
    
    
  4. foundin changed to: "obsolete: 8.5a2"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "uring"
  9. subsystem changed to: "18. Commands M-Z"
  10. title changed to:
    TclUpdateReturnInfo() panics when returning TCL_RETURN
    
  11. type changed to: "Bug"