diff options
Diffstat (limited to 'generic/ttk/ttkTrace.c')
-rw-r--r-- | generic/ttk/ttkTrace.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/generic/ttk/ttkTrace.c b/generic/ttk/ttkTrace.c index 8bc8519..ba66db4 100644 --- a/generic/ttk/ttkTrace.c +++ b/generic/ttk/ttkTrace.c @@ -54,7 +54,7 @@ VarTraceProc( ckfree((ClientData)tracePtr); return NULL; } - Tcl_TraceVar(interp, name, + Tcl_TraceVar2(interp, name, NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, VarTraceProc, clientData); tracePtr->callback(tracePtr->clientData, NULL); @@ -85,7 +85,7 @@ Ttk_TraceHandle *Ttk_TraceVariable( Ttk_TraceProc callback, void *clientData) { - Ttk_TraceHandle *h = (Ttk_TraceHandle*)ckalloc(sizeof(*h)); + Ttk_TraceHandle *h = ckalloc(sizeof(*h)); int status; h->interp = interp; @@ -94,13 +94,13 @@ Ttk_TraceHandle *Ttk_TraceVariable( h->clientData = clientData; h->callback = callback; - status = Tcl_TraceVar(interp, Tcl_GetString(varnameObj), - TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, + status = Tcl_TraceVar2(interp, Tcl_GetString(varnameObj), + NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, VarTraceProc, (ClientData)h); if (status != TCL_OK) { Tcl_DecrRefCount(h->varnameObj); - ckfree((ClientData)h); + ckfree(h); return NULL; } @@ -150,11 +150,11 @@ void Ttk_UntraceVariable(Ttk_TraceHandle *h) h->interp = NULL; return; } - Tcl_UntraceVar(h->interp, Tcl_GetString(h->varnameObj), - TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, + Tcl_UntraceVar2(h->interp, Tcl_GetString(h->varnameObj), + NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, VarTraceProc, (ClientData)h); Tcl_DecrRefCount(h->varnameObj); - ckfree((ClientData)h); + ckfree(h); } } |