Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: cf9c431ff03612e1bd5a103995cf09cc8734f264
Ticket: 2673163fffffffffffffffffffffffffffffffff
Unwanted integer affinity of [upvar]
User & Date: ferrieux on 2009-03-09 06:50:57
Changes

  1. icomment:
    
    
    File Added - 316886: upvar.patch
    
    Attaching the promised patch.
    
    Please note that this patch insists on touching only Tcl_UpvarObjCmd, and not TclObjGetFrame, despite the latter having a very contorted domain (it maps many invalid strings to level 1 silently, and barfs only on out-of-range levels). The reason is that (1) TOGF is stubbed and hence its semantics should not be changed lightly, and (2) it is still reasonably efficient to check this from outside.
    
    Also note that the compiled-upvar paths don't need changing because (1) when the first arg is not known at compile time, upvar switches to runtime; and (2) when the first arg is an integer *and* the total number of args is even, the same switch occurs (initially thinking it would raise an error; but now it will Just Work).
    File Added: upvar.patch
    
    
  2. login: "ferrieux"
  3. mimetype: "text/plain"
  4. username: "ferrieux"