Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 47c841eff59c718917d594675ea7bb46568bc80a
Ticket: 875701ffffffffffffffffffffffffffffffffff
TIP#218 (Tcl Channel Driver Thread State Actions)
User & Date: davygrvy on 2004-01-17 03:00:52
Changes

  1. icomment:
    Logged In: YES 
    user_id=7549
    
    Just discovered something interesting.
    
    If I create a v4 driver in an extension and load it into 8.4, 
    Tcl_ChannelVersion incorrectly returns 
    TCL_CHANNEL_VERSION_1 rather than 
    TCL_CHANNEL_VERSION_3
    
    The proper logic, I think would be to add a ceiling expecting 
    more revisions in the future.  Example:
    
    Tcl_ChannelTypeVersion
    Tcl_ChannelVersion(chanTypePtr)
        Tcl_ChannelType *chanTypePtr;/* Pointer to channel 
    type. */
    {
        if (chanTypePtr->version == TCL_CHANNEL_VERSION_2) {
    return TCL_CHANNEL_VERSION_2;
        } else if (chanTypePtr->version == 
    TCL_CHANNEL_VERSION_3) {
    return TCL_CHANNEL_VERSION_3;
        } else if (chanTypePtr->version == 
    TCL_CHANNEL_VERSION_4) {
    return TCL_CHANNEL_VERSION_4;
        /* reserve this space for future revisions. */
        } else if (chanTypePtr->version < 15) {
    return TCL_CHANNEL_VERSION_4;
        } else {
    /*
     * In <v2 channel versions, the version field is 
    occupied
     * by the Tcl_DriverBlockModeProc
     */
    return TCL_CHANNEL_VERSION_1;
        }
    }
    
    
    
  2. login: "davygrvy"
  3. mimetype: "text/plain"
  4. username: "davygrvy"