Version 1 of Tcl_GetStringResult() forward compatibility

Updated 2002-07-13 02:19:49

In a header file of your C/C++ application or extension that includes the Tcl library, add these lines

  #include <tcl.h>
  ...
  #if (TCL_MAJOR_VERSION < 8)
  #define Tcl_GetStringResult(interp) (interp->result)
  #endif

Why? This helps you deprecate direct access to interp->result so you can upgrade your code written for Tcl 7 so it can be used with Tcl 8, yet still work with Tcl 7.


Category Porting