Skip to content

Commit

Permalink
fixes for tcl8.6 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
dvrsn committed Dec 24, 2009
1 parent 62de4a2 commit 3864bf9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
10 changes: 9 additions & 1 deletion include/nsthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
*
* Core threading and system headers.
*
* $Header: /Users/dossy/Desktop/cvs/aolserver/include/nsthread.h,v 1.31 2005/08/23 21:41:31 jgdavidson Exp $
* $Header: /Users/dossy/Desktop/cvs/aolserver/include/nsthread.h,v 1.32 2009/12/24 19:50:06 dvrsn Exp $
*/

#ifndef NSTHREAD_H
Expand Down Expand Up @@ -418,4 +418,12 @@ NS_EXTERN char *Ns_ThreadStrCopy(char *old);

#endif /* NS_NOCOMPAT */

/*
* tcl 8.6 and TIP 330/336 compatability
*/

#if (TCL_MAJOR_VERSION < 8) || (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 6)
#define Tcl_GetErrorLine(interp) (interp->errorLine)
#endif

#endif /* NSTHREAD_H */
4 changes: 2 additions & 2 deletions nsd/adpeval.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* ADP string and file eval.
*/

static const char *RCSID = "@(#) $Header: /Users/dossy/Desktop/cvs/aolserver/nsd/adpeval.c,v 1.49 2006/06/28 17:41:06 shmooved Exp $, compiled: " __DATE__ " " __TIME__;
static const char *RCSID = "@(#) $Header: /Users/dossy/Desktop/cvs/aolserver/nsd/adpeval.c,v 1.50 2009/12/24 19:50:07 dvrsn Exp $, compiled: " __DATE__ " " __TIME__;

#include "nsd.h"

Expand Down Expand Up @@ -836,7 +836,7 @@ NsAdpLogError(NsInterp *itPtr)

if (framePtr != NULL) {
Ns_DStringPrintf(&ds, "\n at line %d of ",
framePtr->line + interp->errorLine);
framePtr->line + Tcl_GetErrorLine(interp));
}
inc = "";
while (framePtr != NULL) {
Expand Down
8 changes: 4 additions & 4 deletions nsd/tclloop.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* monitored and managed by "ns_loop_ctl" command.
*/

static const char *RCSID = "@(#) $Header: /Users/dossy/Desktop/cvs/aolserver/nsd/tclloop.c,v 1.3 2008/06/20 08:06:32 gneumann Exp $, compiled: " __DATE__ " " __TIME__;
static const char *RCSID = "@(#) $Header: /Users/dossy/Desktop/cvs/aolserver/nsd/tclloop.c,v 1.4 2009/12/24 19:50:08 dvrsn Exp $, compiled: " __DATE__ " " __TIME__;

#include "nsd.h"

Expand Down Expand Up @@ -157,7 +157,7 @@ NsTclForObjCmd(arg, interp, objc, objv)
if (result == TCL_ERROR) {
char msg[32 + TCL_INTEGER_SPACE];

sprintf(msg, "\n (\"for\" body line %d)",interp->errorLine);
sprintf(msg, "\n (\"for\" body line %d)",Tcl_GetErrorLine(interp));
Tcl_AddErrorInfo(interp, msg);
}
break;
Expand Down Expand Up @@ -242,7 +242,7 @@ NsTclWhileObjCmd(arg, interp, objc, objv)
char msg[32 + TCL_INTEGER_SPACE];

sprintf(msg, "\n (\"while\" body line %d)",
interp->errorLine);
Tcl_GetErrorLine(interp));
Tcl_AddErrorInfo(interp, msg);
}
break;
Expand Down Expand Up @@ -460,7 +460,7 @@ NsTclForeachObjCmd(arg, interp, objc, objv)
char msg[32 + TCL_INTEGER_SPACE];

sprintf(msg, "\n (\"foreach\" body line %d)",
interp->errorLine);
Tcl_GetErrorLine(interp));
Tcl_AddObjErrorInfo(interp, msg, -1);
break;
} else {
Expand Down

0 comments on commit 3864bf9

Please sign in to comment.