Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e1d4640c9d710b1321ab6661081798b808cf2e17
Ticket: 520304ffffffffffffffffffffffffffffffffff
Tcl_GetIndexFromObjStruct signature
User & Date: jenglish on 2002-02-20 02:56:44
Changes

  1. assignee changed to: "nijtmans"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    In the TIP27-ification of tclIndexObj.c, the third
    parameter of Tcl_GetIndexFromObjStruct() changed from a
    'char **' to a 'CONST char **' (actually a CONST84 char
    **).
    
    In the actual use of the function though, the
    'tablePtr' argument typically does not point (directly)
    to a 'char *'  or a 'const char *', but rather to an
    array of some user-defined structure type (whose first
    member is a 'char *' or 'const char *'). 
    
    So the most appropriate type is probably 'void
    *structTablePtr' (which should be cast to a 'char *'
    internally to do address arithmetic and to a 'CONST
    char **' to extract the string value, just like it does
    now.)
    
    This change would also make it easier to write
    extensions that compile against pre- and post-TIP27
    versions of the core without resorting to #ifdefs or
    -DUSE_NON_CONST; inserting a cast to (void *) would
    suffice for pre-TIP27 versions.
    
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "jenglish"
  9. subsystem changed to: "13. Index Object"
  10. title changed to: "Tcl_GetIndexFromObjStruct signature"
  11. type changed to: "Bug"