Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 323bceea7f8196029d1a04fb7d66ff2658b1f19b
Ticket: 405998ffffffffffffffffffffffffffffffffff
Tcl_SetListObj fails reset obj properly
User & Date: dgp on 2001-04-04 11:21:44
Changes

  1. assignee changed to: "hobbs"
  2. icomment:
    Logged In: YES 
    user_id=80530
    
    According to Tcl_Obj(3) (doc.Object.3):
    
     The bytes and the length members together hold an object's
     string representation, which is a counted or binary string
     that  may  contain  binary  data with embedded null bytes.
     bytes points to the first byte of the  string  representa-
     tion.   The  length member gives the number of bytes.  The
     byte array must always have a null after the last byte, at
     offset  length;
    
    There is similar language in ObjectType.3.  Manipulators of
    Tcl_Obj's must preserve the invariant:
    
    (objPtr->bytes == NULL) ||
    (objPtr->bytes[objPtr->length] == '\0')
    
    Tcl_SetListObj() fails to do that.  The contributed
    patch corrects the failure.
    
    I'm punting back to the List Object maintainers to 
    determine whether the best fix is the contributed
    patch, or having Tcl_SetListObj() return a Tcl_Obj
    that actually has (objPtr->typePtr == &tclListType).
    
    
  3. login: "dgp"
  4. mimetype: "text/plain"
  5. username: "dgp"