diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-11-08 22:15:37 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-11-08 22:15:37 (GMT) |
| commit | e18b1490d5ec61c9b02def910eed94626e6d3231 (patch) | |
| tree | 43ddc9633d7f8af5ee0ebbb45c0e439862c88344 /generic/tclTrace.c | |
| parent | b6c0957a8f2f5b52b9c0f1c1c433cda524970f99 (diff) | |
| parent | a90bc45a547c857ffc5257490827aebfb7ac6d8d (diff) | |
| download | tcl-e18b1490d5ec61c9b02def910eed94626e6d3231.zip tcl-e18b1490d5ec61c9b02def910eed94626e6d3231.tar.gz tcl-e18b1490d5ec61c9b02def910eed94626e6d3231.tar.bz2 | |
Merge 8.7
Diffstat (limited to 'generic/tclTrace.c')
| -rw-r--r-- | generic/tclTrace.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/generic/tclTrace.c b/generic/tclTrace.c index 1b70f1e..ac92a73 100644 --- a/generic/tclTrace.c +++ b/generic/tclTrace.c @@ -21,7 +21,7 @@ typedef struct { int flags; /* Operations for which Tcl command is to be * invoked. */ - size_t length; /* Number of non-NUL chars. in command. */ + Tcl_Size length; /* Number of non-NUL chars. in command. */ char command[TCLFLEXARRAY]; /* Space for Tcl command to invoke. Actual * size will be as large as necessary to hold * command. This field must be the last in the @@ -41,7 +41,7 @@ typedef struct { typedef struct { int flags; /* Operations for which Tcl command is to be * invoked. */ - size_t length; /* Number of non-NUL chars. in command. */ + Tcl_Size length; /* Number of non-NUL chars. in command. */ Tcl_Trace stepTrace; /* Used for execution traces, when tracing * inside the given command */ Tcl_Size startLevel; /* Used for bookkeeping with step execution @@ -92,13 +92,14 @@ typedef struct { * Forward declarations for functions defined in this file: */ -enum traceOptions { +/* 'OLD' options are pre-Tcl-8.4 style */ +enum traceOptionsEnum { TRACE_ADD, TRACE_INFO, TRACE_REMOVE #ifndef TCL_REMOVE_OBSOLETE_TRACES ,TRACE_OLD_VARIABLE, TRACE_OLD_VDELETE, TRACE_OLD_VINFO #endif }; -typedef int (Tcl_TraceTypeObjCmd)(Tcl_Interp *interp, enum traceOptions optionIndex, +typedef int (Tcl_TraceTypeObjCmd)(Tcl_Interp *interp, enum traceOptionsEnum optionIndex, Tcl_Size objc, Tcl_Obj *const objv[]); static Tcl_TraceTypeObjCmd TraceVariableObjCmd; @@ -206,8 +207,7 @@ Tcl_TraceObjCmd( #endif NULL }; - /* 'OLD' options are pre-Tcl-8.4 style */ - enum traceOptions optionIndex; + enum traceOptionsEnum optionIndex; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?"); @@ -269,8 +269,7 @@ Tcl_TraceObjCmd( case TRACE_OLD_VDELETE: { Tcl_Obj *copyObjv[6]; Tcl_Obj *opsList; - int code; - Tcl_Size numFlags; + int code, numFlags; if (objc != 5) { Tcl_WrongNumArgs(interp, 2, objv, "name ops command"); @@ -398,7 +397,7 @@ Tcl_TraceObjCmd( static int TraceExecutionObjCmd( Tcl_Interp *interp, /* Current interpreter. */ - enum traceOptions optionIndex, /* Add, info or remove */ + enum traceOptionsEnum optionIndex, /* Add, info or remove */ Tcl_Size objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { @@ -645,7 +644,7 @@ TraceExecutionObjCmd( static int TraceCommandObjCmd( Tcl_Interp *interp, /* Current interpreter. */ - enum traceOptions optionIndex, /* Add, info or remove */ + enum traceOptionsEnum optionIndex, /* Add, info or remove */ Tcl_Size objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { @@ -840,7 +839,7 @@ TraceCommandObjCmd( static int TraceVariableObjCmd( Tcl_Interp *interp, /* Current interpreter. */ - enum traceOptions optionIndex, /* Add, info or remove */ + enum traceOptionsEnum optionIndex, /* Add, info or remove */ Tcl_Size objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { @@ -2125,7 +2124,7 @@ TraceVarProc( */ typedef struct { - Tcl_CmdObjTraceProc *proc; + Tcl_CmdObjTraceProc *proc; Tcl_CmdObjTraceDeleteProc *delProc; void *clientData; } TraceWrapperInfo; @@ -2166,7 +2165,7 @@ Tcl_CreateObjTrace( Tcl_CmdObjTraceDeleteProc *delProc) /* Function to call when trace is deleted */ { - TraceWrapperInfo *info = (TraceWrapperInfo *)Tcl_Alloc(sizeof(TraceWrapperInfo)); + TraceWrapperInfo *info = (TraceWrapperInfo *)Tcl_Alloc(sizeof(TraceWrapperInfo)); info->proc = proc; info->delProc = delProc; info->clientData = clientData; @@ -2180,7 +2179,7 @@ Tcl_CreateObjTrace2( Tcl_Interp *interp, /* Tcl interpreter */ Tcl_Size level, /* Maximum nesting level */ int flags, /* Flags, see above */ - Tcl_CmdObjTraceProc2 *proc2, /* Trace callback */ + Tcl_CmdObjTraceProc2 *proc, /* Trace callback */ void *clientData, /* Client data for the callback */ Tcl_CmdObjTraceDeleteProc *delProc) /* Function to call when trace is deleted */ @@ -2212,7 +2211,7 @@ Tcl_CreateObjTrace2( tracePtr = (Trace *)Tcl_Alloc(sizeof(Trace)); tracePtr->level = level; - tracePtr->proc = proc2; + tracePtr->proc = proc; tracePtr->clientData = clientData; tracePtr->delProc = delProc; tracePtr->nextPtr = iPtr->tracePtr; |
