Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 6e58a2aa474cdfacbc7bf4a2c92362baf5972974
Ticket: cafef7c5856ec8b1cbc0ea13c6c41d96d9982d75
Unexplained code in StringRplcCmd function (tclCmdMZ.c)
User & Date: dgp on 2015-02-18 18:18:50
Changes

  1. icomment:
    
    Both calls to Tcl_GetUnicodeFromObj() are necessary.
    
    The first one gets the value for length.
    
    The second gets a valid value for ustring without
    any fear of corruption due to shimmering.
    
    A few tweaks can be applied.  There's no need to
    store the result of the first call in ustring,
    and removing that, the whole ustring variable
    can move into the nested scope where it is used.
    I don't mind that change.  The one called for in
    the original report will introduce bugs.
    
    I also favor adding the tests to the test suite that
    will demonstrate that fact.
    
  2. login: "dgp"
  3. mimetype: "text/plain"