tDOM/tdom

tDOM compilation fails under tcl 8.6

Closed this issue · 3 comments

The error is:

./generic/tcldom.c: In function ‘tcldom_EvalLocked’:
./generic/tcldom.c:5937:62: error: ‘Tcl_Interp’ has no member named ‘errorLine’

According to this: http://wiki.tcl.tk/24759

direct access to interp->errorline
This is also gone in 8.6, and the name of the back-compat macro is USE_INTERP_ERRORLINE. The direct access was deprecated by TIP #336.
Use Tcl_SetErrorLine and Tcl_GetErrorLine instead.

So, I propose the following change:

if (ret == TCL_ERROR) {
    char msg[64 + TCL_INTEGER_SPACE];
    sprintf(msg, "\n    (\"%s %s\" body line %d)", Tcl_GetString(objv[0]),
            Tcl_GetString(objv[1]), interp->errorLine);
    Tcl_AddErrorInfo(interp, msg);
}

if (ret == TCL_ERROR) {
    char msg[64 + TCL_INTEGER_SPACE];
    sprintf(msg, "\n    (\"%s %s\" body line %d)", Tcl_GetString(objv[0]),
            Tcl_GetString(objv[1]),

if defined(USE_INTERP_ERRORLINE)

            interp->errorLine

else

if (TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION >= 6)

    Tcl_GetErrorLine(interp)

else

            interp->errorLine

endif

endif

    );
    Tcl_AddErrorInfo(interp, msg);
}

Trunk should now build with tcl8.6 without this problem.

Yes, it does. Thanks for fixing it.

Now that Tcl 8.6.0 has been released, will there be a new release of tDOM containing fixes for Tcl 8.6?