Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: be4ee84e3b2522068fd55dc57f5b59e159bf26fe
Ticket: 520304ffffffffffffffffffffffffffffffffff
Tcl_GetIndexFromObjStruct signature
User & Date: nijtmans on 2002-02-21 22:31:47
Changes

  1. icomment:
    Logged In: YES 
    user_id=61031
    
    One of the reasons for TIP 27 was to be able to use the Tcl
    library in C++ code, even if input parameters were declared
    const. So, what if we use "static const struct substOption"
    in stead of "static struct substOption". The example code by
    Jou still then works without any type-cast.
    
    In that light, I would prefer to use (const void *) as the
    second parameter of Tcl_GetIndexFromObjStruct, and that's
    what it really is: a const pointer to an unknown structure.
    Then the (SOME_CAST) in Jou's example code can simply be
    left out, both in C and C++ code.
    
    Is everybody happy with that alternative?
    
    
  2. login: "nijtmans"
  3. mimetype: "text/plain"
  4. username: "nijtmans"