Skip to content

Commit

Permalink
Remove TCL_TRACE_READS for Tcl_TraceVar(net-type)
Browse files Browse the repository at this point in the history
Patch by: michaelortmann

The concept idea was:
    - Write trace to give that warning and update the C variable.
    - Read trace to return a string to Tcl whenever the variable is read instead of the internal number.

However, existing scripts might rely on this being a number from Tcl's point of view. This is fine until we decide to change that.
  • Loading branch information
michaelortmann committed Mar 14, 2020
1 parent 6e072f0 commit 36e00f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mod/server.mod/server.c
Expand Up @@ -2096,7 +2096,7 @@ static char *server_close()
TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
traced_serveraddress, NULL);
Tcl_UntraceVar(interp, "net-type",
TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
traced_nettype, NULL);
Tcl_UntraceVar(interp, "nick-len",
TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
Expand Down Expand Up @@ -2269,7 +2269,7 @@ char *server_start(Function *global_funcs)
TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
traced_serveraddress, NULL);
Tcl_TraceVar(interp, "net-type",
TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
traced_nettype, NULL);
Tcl_TraceVar(interp, "nick-len",
TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
Expand Down

0 comments on commit 36e00f3

Please sign in to comment.