Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 3cec29a30aa302d5b525a67861460ec5b1e32046eaec38dbfc6ce0f757ce4fb7
Ticket: e58d7e19e937496f179fe711345b415f3f3d31b2
Upwards compatibility of TclObjTypeHasProc()
User & Date: griffin on 2023-07-31 09:47:56
Changes

  1. icomment:
    Sorry for the delay in responding. While traveling I've had time but no internet, or internet but no time. :)
    
    I did not remember, or was not aware, that minor versions are required to be binary compatible.  
    That one is on me.
    
    I still think it will be a mistake to limit the ability to change the shape of the ObjType in the future.
    Such a change would only happen on a major version change anyway.
    But I'm willing to accept it.
    
    As for checking multiple versions, I assumed the check would become a switch statement in the future.
    I probably should have coded it that way to begin with.
    
    The comment about invalid memory reads was a mistake on my part, I was thinking about the version test incorrectly. Please ignore that.
    
    The current trunk is fine as it is since there really is only one version of the ObjType.
    To reiterate, when Version 3 is created, the test will have to be changed to a switch statement.
    If the shape changes, using sizeof can no longer be assumed to be unique between versions.
    
    The failure demo is unimpressive. Rewriting the test as a switch can solve that one.
    However, if using size & offset tests is they way others want to proceed, I'll go along with it.
    
    As an aside, can we change this macro to an inline function?  These can be debugged, whereas macros cannot.
    
  2. login: "griffin"
  3. mimetype: "text/x-markdown"