Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 7fe7fe2f3a736a4cbb5c2d6495b1a975303a9bef
Ticket: 1685436fffffffffffffffffffffffffffffffff
document Tcl_Preserve-ability
User & Date: andreas_kupries on 2007-03-22 04:10:58
Changes

  1. icomment:
    Logged In: YES 
    user_id=75003
    Originator: NO
    
    I wonder if we can snarf ideas from the linux kernel for that. IIRC they are using special macros and type magic, likely gcc specific, to give pointers additional attributes which the compiler can check. For us basically a preserve-ability tag which goes with the pointer and is checker at compile time when Tcl_Preserve is used. I should note that I have no actual idea how their stuff works in detail. Regarding it being gcc specific, it should be easy to disable that for other compilers through redefinition of whatever macros are used to implement this.
    
    Even if we are unable or unwilling to reproduce the thing we can still use macros like
    
        #define PRESERVABLE(x) x
    
    to at least add appropriate tags in the sources. No compiler checks, but at least semi-documentation in the code.
    
    
    
  2. login: "andreas_kupries"
  3. mimetype: "text/plain"
  4. username: "andreas_kupries"