Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 0ba4a3047dffad2aef3a90b4af4147b63ee16a6c
Ticket: 585105ffffffffffffffffffffffffffffffffff
CONST-ified parser
User & Date: dgp on 2002-08-02 05:21:02
Changes

  1. icomment:
    Logged In: YES 
    user_id=80530
    
    
    There are 3 potential problems with the Tk patch.
    
    The Tcl Patch CONST-ifies the Tcl_CmdProc typedef,
    so that the string arguments passed in as "argv" are not
    supposed to be scribbled on.  The Tk patch here makes
    use of USE_COMPAT_CONST to trick the compiler into
    using the 8.3 definition of Tcl_CmdProc, so Tk will build
    fine.
    
    However, if another module is built using the 8.4 definition,
    and the compiler relies on the "const" nature of the arguments
    to store them in read-only memory, there could be a run time
    error if in fact Tk does attempt to scribble on any of the
    arguments passed to its commands.
    
    Tk in fact does make 3 such attempts:
    
    generic/tkBind.c, lines 4218, 4222: parsing an event specifier
    
    generic/tkTextIndex.c, lines 368,370,457,459,479,481,491,493:
                parsing text index strings
    
    generic/tkTest.c, line 2259: some strange conversion of \n
    <-> \0
    
    A better patch for Tk will address these areas.
    
    
    
  2. login: "dgp"
  3. mimetype: "text/plain"
  4. username: "dgp"