summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2018-04-17 14:32:30 (GMT)
committerdgp <dgp@users.sourceforge.net>2018-04-17 14:32:30 (GMT)
commit80e5aed49e2cac237b9d91db0f5dc1139c6462dd (patch)
tree974d2269b2ed2c467fe8949f7a16b7783305fe3d /generic
parent689f5653f9349eb55b176a83f0daf2762a353a2b (diff)
downloadtcl-80e5aed49e2cac237b9d91db0f5dc1139c6462dd.zip
tcl-80e5aed49e2cac237b9d91db0f5dc1139c6462dd.tar.gz
tcl-80e5aed49e2cac237b9d91db0f5dc1139c6462dd.tar.bz2
Restore build success to the TCL_REMOVE_OBSOLETE_TRACES configuration.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclTrace.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/generic/tclTrace.c b/generic/tclTrace.c
index 2e1b241..cb465ca 100644
--- a/generic/tclTrace.c
+++ b/generic/tclTrace.c
@@ -176,7 +176,9 @@ Tcl_TraceObjCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
int optionIndex;
+#ifndef TCL_REMOVE_OBSOLETE_TRACES
char *name, *flagOps, *p;
+#endif
/* Main sub commands to 'trace' */
static const char *traceOptions[] = {
"add", "info", "remove",
@@ -352,10 +354,12 @@ Tcl_TraceObjCmd(
}
return TCL_OK;
+#ifndef TCL_REMOVE_OBSOLETE_TRACES
badVarOps:
Tcl_AppendResult(interp, "bad operations \"", flagOps,
"\": should be one or more of rwua", NULL);
return TCL_ERROR;
+#endif
}
/*
@@ -902,9 +906,11 @@ TraceVariableObjCmd(
(sizeof(CombinedTraceVarInfo) + length + 1
- sizeof(ctvarPtr->traceCmdInfo.command)));
ctvarPtr->traceCmdInfo.flags = flags;
+#ifndef TCL_REMOVE_OBSOLETE_TRACES
if (objv[0] == NULL) {
ctvarPtr->traceCmdInfo.flags |= TCL_TRACE_OLD_STYLE;
}
+#endif
ctvarPtr->traceCmdInfo.length = length;
flags |= TCL_TRACE_UNSETS | TCL_TRACE_RESULT_OBJECT;
memcpy(ctvarPtr->traceCmdInfo.command, command, length+1);
@@ -931,7 +937,11 @@ TraceVariableObjCmd(
TraceVarProc, clientData)) != 0) {
tvarPtr = (TraceVarInfo *) clientData;
if ((tvarPtr->length == length)
- && ((tvarPtr->flags & ~TCL_TRACE_OLD_STYLE)==flags)
+ && ((tvarPtr->flags
+#ifndef TCL_REMOVE_OBSOLETE_TRACES
+& ~TCL_TRACE_OLD_STYLE
+#endif
+ )==flags)
&& (strncmp(command, tvarPtr->command,
(size_t) length) == 0)) {
Tcl_UntraceVar2(interp, name, NULL,