Version 0 of Tcl_GetErrorLine() forward compatibility

Updated 2008-12-15 18:36:38 by dgp

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) || (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 6)
  #define Tcl_GetErrorLine(interp) (interp->errorLine)
  #endif

Why? This helps you deprecate direct access to interp->errorLine so you can upgrade your code written for pre-8.6 Tcl so it can be used with Tcl 8.6, yet still work with earlier Tcl releases.


Category Porting