Version 11 of Migration to 8.4: CONSTification

Updated 2002-07-10 18:58:31

Page to record guidelines for adapting C source code to deal with the CONST-ified interfaces of Tcl/Tk 8.4.


Most stuff can be fixed by putting CONST (or, if you're unlucky, CONST84) in your types. Sometimes you might need to add a cast. Anything that traditionally worked, will continue to work. There's also a symbol you can #define to switch off the constness in the interface (whose name I don't remember)

The define is USE_NON_CONST.


Is the new constness adding value? If so, turning it off seems like it would defeat that added value. If the new constness is not adding value, then it would seem like turning it off by default would be as good a solution as having it turned on.

And if the new constness is adding value, then will automatically adding CONST to types cause any other problems?


DGP The answers are subtler than the sketch above implies. I will get to this. Please be patient.

For example USE_NON_CONST does not disable all the TIP 27 changes. It is a more careful, more useful migration tool than that.


See also Changes in Tcl/Tk 8.4