Direct access to interp->result
! Oh, that's very deprecated nowadays.
Workaround
Your best bet is to build with Tcl 8.5 or 8.4 (where it's just NOT RECOMMENDED to use such coding patterns), but you can make things work in 8.6 by passing the -DUSE_INTERP_RESULT
flag to the compiler. You will get warnings if you do this, but that's better than hard errors, yes?
Fixing it properly
Each of those places really ought to be changed to use Tcl_SetResult
, i.e. from:
interp->result = "usage: glosses [1 | 0]";
to
Tcl_SetResult(interp, "usage: glosses [1 | 0]", TCL_DYNAMIC);
(OK, the TCL_DYNAMIC
could be TCL_STATIC
in this case, but we might as well code defensively; the overhead is effectively zero.)
Note that the Tcl_SetResult
API has been supported in Tcl for decades. Changing to use it will not prevent code from building with older versions.