summaryrefslogtreecommitdiffstats
path: root/unix/dltest/pkgb.c
diff options
context:
space:
mode:
authordonal.k.fellows@manchester.ac.uk <dkf>2013-01-02 18:35:39 (GMT)
committerdonal.k.fellows@manchester.ac.uk <dkf>2013-01-02 18:35:39 (GMT)
commit7a80995cbfb3b65bbd93aca49f3b0e8ca7cf2d83 (patch)
tree65985498766ca85435a373d9cabaf3ba4af5c775 /unix/dltest/pkgb.c
parent25638b8a0b176a38969683eb85addb0f965bacfa (diff)
parent6ba39bbeaa4ebd171089b1943b9521ae7570e249 (diff)
downloadtcl-7a80995cbfb3b65bbd93aca49f3b0e8ca7cf2d83.zip
tcl-7a80995cbfb3b65bbd93aca49f3b0e8ca7cf2d83.tar.gz
tcl-7a80995cbfb3b65bbd93aca49f3b0e8ca7cf2d83.tar.bz2
merge trunk
Diffstat (limited to 'unix/dltest/pkgb.c')
-rw-r--r--unix/dltest/pkgb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/unix/dltest/pkgb.c b/unix/dltest/pkgb.c
index 40f1fdd..ad61d77 100644
--- a/unix/dltest/pkgb.c
+++ b/unix/dltest/pkgb.c
@@ -42,6 +42,10 @@ static int Pkgb_DemoObjCmd(ClientData clientData,
*----------------------------------------------------------------------
*/
+#ifndef Tcl_GetErrorLine
+# define Tcl_GetErrorLine(interp) ((interp)->errorLine)
+#endif
+
static int
Pkgb_SubObjCmd(
ClientData dummy, /* Not used. */
@@ -57,6 +61,9 @@ Pkgb_SubObjCmd(
}
if ((Tcl_GetIntFromObj(interp, objv[1], &first) != TCL_OK)
|| (Tcl_GetIntFromObj(interp, objv[2], &second) != TCL_OK)) {
+ char buf[TCL_INTEGER_SPACE];
+ sprintf(buf, "%d", Tcl_GetErrorLine(interp));
+ Tcl_AppendResult(interp, " in line: ", buf, NULL);
return TCL_ERROR;
}
Tcl_SetObjResult(interp, Tcl_NewIntObj(first - second));