Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 88e6e9418b39e16a598d7d33efc586f6eb27c808
Ticket: 509340ffffffffffffffffffffffffffffffffff
ClientData set to int* not void*
User & Date: davygrvy on 2002-02-23 14:53:30
Changes

  1. icomment:
    Logged In: YES 
    user_id=7549
    
    forget "some systems".  This is Win32 with MSVC as the 
    compiler.
    
    What is that test asking?  Is it asking are you strict ANSI 
    or ANSI compilent as oppossed to pre-ANSI?
    
    #ifndef _CLIENTDATA
    #   if defined(__STDC__) || defined(__cplusplus) || defined
    (__BORLANDC__)
    typedef void *ClientData;
    #   else
    typedef int *ClientData;
    #   endif /* __STDC__ */
    #   define _CLIENTDATA
    #endif
    
    More flexible?  How so?  sizeof(*(ClientData))?  What good 
    is that, not that it would work?
    
    I do most of my work in C++ and never had to cast a typed 
    pointer to a ClientData.  Coming out of a ClientData to a 
    typed pointer, of course yes, I had to cast.  Then I do 
    some work in C, and I get this damn cast shit going into a 
    ClientData.  But its still legal in C.  Typed pointer to a 
    void pointer without a cast is legal in this compiler for 
    C.  If this is the case, and is fine in C++ according to 
    the existing logic, don't force an int* when it isn't 
    needed, please.  There are users of the Tcl API besides the 
    core itself where old-fashioned seems to always take 
    precidence over advances.  Just because its there, and has 
    been for a while, doesn't mean its right by only it's 
    existence.  Please question the meaning of the preprocessor 
    logic.  It doesn't make sense for this compiler.
    
    #if !defined(__STDC__) and !defined(__cplusplus) == 1
    does that mean a void* isn't legal?  But in the case for 
    defined(_MSC_VER), it is true, though.
    
    Is that test testing a compiler feature or forcing an 
    interface?  If it's forcing an interface, why?  It gets in 
    my way as a user of the API.
    
    
    
  2. login: "davygrvy"
  3. mimetype: "text/plain"
  4. status changed to: "Open"
  5. username: "davygrvy"