summaryrefslogtreecommitdiffstats
path: root/generic/tclTrace.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-07-10 05:51:56 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-07-10 05:51:56 (GMT)
commit2a3d586a796e62f522303b3ab71c84743a73bf89 (patch)
tree75ee68f89422b10ec42523bafa46fae061c6489d /generic/tclTrace.c
parentd409a29e57b2d4ced1bad4b0bb5bb1e2387f4120 (diff)
parent6cf70a8d484881c9886d7d0cd5d2b9b6feac10fb (diff)
downloadtcl-2a3d586a796e62f522303b3ab71c84743a73bf89.zip
tcl-2a3d586a796e62f522303b3ab71c84743a73bf89.tar.gz
tcl-2a3d586a796e62f522303b3ab71c84743a73bf89.tar.bz2
Merge 8.7, and continue implementation. Almost done
Diffstat (limited to 'generic/tclTrace.c')
-rw-r--r--generic/tclTrace.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/generic/tclTrace.c b/generic/tclTrace.c
index 36983f2..a073598 100644
--- a/generic/tclTrace.c
+++ b/generic/tclTrace.c
@@ -325,7 +325,7 @@ Tcl_TraceObjCmd(
resultListPtr = Tcl_NewObj();
name = Tcl_GetString(objv[2]);
FOREACH_VAR_TRACE(interp, name, clientData) {
- TraceVarInfo *tvarPtr = clientData;
+ TraceVarInfo *tvarPtr = (TraceVarInfo *)clientData;
char *q = ops;
pairObjPtr = Tcl_NewListObj(0, NULL);
@@ -469,7 +469,7 @@ TraceExecutionObjCmd(
command = TclGetStringFromObj(objv[5], &commandLength);
length = (size_t) commandLength;
if ((enum traceOptions) optionIndex == TRACE_ADD) {
- TraceCommandInfo *tcmdPtr = ckalloc(
+ TraceCommandInfo *tcmdPtr = (TraceCommandInfo *)ckalloc(
offsetof(TraceCommandInfo, command) + 1 + length);
tcmdPtr->flags = flags;
@@ -509,7 +509,7 @@ TraceExecutionObjCmd(
}
FOREACH_COMMAND_TRACE(interp, name, clientData) {
- TraceCommandInfo *tcmdPtr = clientData;
+ TraceCommandInfo *tcmdPtr = (TraceCommandInfo *)clientData;
/*
* In checking the 'flags' field we must remove any extraneous
@@ -578,7 +578,7 @@ TraceExecutionObjCmd(
FOREACH_COMMAND_TRACE(interp, name, clientData) {
int numOps = 0;
Tcl_Obj *opObj, *eachTraceObjPtr, *elemObjPtr;
- TraceCommandInfo *tcmdPtr = clientData;
+ TraceCommandInfo *tcmdPtr = (TraceCommandInfo *)clientData;
/*
* Build a list with the ops list as the first obj element and the
@@ -706,7 +706,7 @@ TraceCommandObjCmd(
command = TclGetStringFromObj(objv[5], &commandLength);
length = (size_t) commandLength;
if ((enum traceOptions) optionIndex == TRACE_ADD) {
- TraceCommandInfo *tcmdPtr = ckalloc(
+ TraceCommandInfo *tcmdPtr = (TraceCommandInfo *)ckalloc(
offsetof(TraceCommandInfo, command) + 1 + length);
tcmdPtr->flags = flags;
@@ -742,7 +742,7 @@ TraceCommandObjCmd(
}
FOREACH_COMMAND_TRACE(interp, name, clientData) {
- TraceCommandInfo *tcmdPtr = clientData;
+ TraceCommandInfo *tcmdPtr = (TraceCommandInfo *)clientData;
if ((tcmdPtr->length == length) && (tcmdPtr->flags == flags)
&& (strncmp(command, tcmdPtr->command,
@@ -781,7 +781,7 @@ TraceCommandObjCmd(
FOREACH_COMMAND_TRACE(interp, name, clientData) {
int numOps = 0;
Tcl_Obj *opObj, *eachTraceObjPtr, *elemObjPtr;
- TraceCommandInfo *tcmdPtr = clientData;
+ TraceCommandInfo *tcmdPtr = (TraceCommandInfo *)clientData;
/*
* Build a list with the ops list as the first obj element and the
@@ -909,7 +909,7 @@ TraceVariableObjCmd(
command = TclGetStringFromObj(objv[5], &commandLength);
length = (size_t) commandLength;
if ((enum traceOptions) optionIndex == TRACE_ADD) {
- CombinedTraceVarInfo *ctvarPtr = ckalloc(
+ CombinedTraceVarInfo *ctvarPtr = (CombinedTraceVarInfo *)ckalloc(
offsetof(CombinedTraceVarInfo, traceCmdInfo.command)
+ 1 + length);
@@ -940,7 +940,7 @@ TraceVariableObjCmd(
name = Tcl_GetString(objv[3]);
FOREACH_VAR_TRACE(interp, name, clientData) {
- TraceVarInfo *tvarPtr = clientData;
+ TraceVarInfo *tvarPtr = (TraceVarInfo *)clientData;
if ((tvarPtr->length == length)
&& ((tvarPtr->flags
@@ -971,7 +971,7 @@ TraceVariableObjCmd(
name = Tcl_GetString(objv[3]);
FOREACH_VAR_TRACE(interp, name, clientData) {
Tcl_Obj *opObjPtr, *eachTraceObjPtr, *elemObjPtr;
- TraceVarInfo *tvarPtr = clientData;
+ TraceVarInfo *tvarPtr = (TraceVarInfo *)clientData;
/*
* Build a list with the ops list as the first obj element and the
@@ -1114,7 +1114,7 @@ Tcl_TraceCommand(
ClientData clientData) /* Arbitrary argument to pass to proc. */
{
Command *cmdPtr;
- register CommandTrace *tracePtr;
+ CommandTrace *tracePtr;
cmdPtr = (Command *) Tcl_FindCommand(interp, cmdName, NULL,
TCL_LEAVE_ERR_MSG);
@@ -1126,7 +1126,7 @@ Tcl_TraceCommand(
* Set up trace information.
*/
- tracePtr = ckalloc(sizeof(CommandTrace));
+ tracePtr = (CommandTrace *)ckalloc(sizeof(CommandTrace));
tracePtr->traceProc = proc;
tracePtr->clientData = clientData;
tracePtr->flags = flags &
@@ -1291,7 +1291,7 @@ TraceCommandProc(
int flags) /* OR-ed bits giving operation and other
* information. */
{
- TraceCommandInfo *tcmdPtr = clientData;
+ TraceCommandInfo *tcmdPtr = (TraceCommandInfo *)clientData;
int code;
Tcl_DString cmd;
@@ -1469,7 +1469,7 @@ TclCheckExecutionTraces(
active.nextTracePtr = tracePtr->nextPtr;
}
if (tracePtr->traceProc == TraceCommandProc) {
- TraceCommandInfo *tcmdPtr = tracePtr->clientData;
+ TraceCommandInfo *tcmdPtr = (TraceCommandInfo *)tracePtr->clientData;
if (tcmdPtr->flags != 0) {
tcmdPtr->curFlags = traceFlags | TCL_TRACE_EXEC_DIRECT;
@@ -1610,7 +1610,7 @@ TclCheckInterpTraces(
if (tracePtr->flags & traceFlags) {
if (tracePtr->proc == TraceExecutionProc) {
- TraceCommandInfo *tcmdPtr = tracePtr->clientData;
+ TraceCommandInfo *tcmdPtr = (TraceCommandInfo *)tracePtr->clientData;
tcmdPtr->curFlags = traceFlags;
tcmdPtr->curCode = code;
@@ -1725,7 +1725,7 @@ static void
CommandObjTraceDeleted(
ClientData clientData)
{
- TraceCommandInfo *tcmdPtr = clientData;
+ TraceCommandInfo *tcmdPtr = (TraceCommandInfo *)clientData;
if (tcmdPtr->refCount-- <= 1) {
ckfree(tcmdPtr);
@@ -1769,7 +1769,7 @@ TraceExecutionProc(
{
int call = 0;
Interp *iPtr = (Interp *) interp;
- TraceCommandInfo *tcmdPtr = clientData;
+ TraceCommandInfo *tcmdPtr = (TraceCommandInfo *)clientData;
int flags = tcmdPtr->curFlags;
int code = tcmdPtr->curCode;
int traceCode = TCL_OK;
@@ -1923,7 +1923,7 @@ TraceExecutionProc(
register unsigned len = strlen(command) + 1;
tcmdPtr->startLevel = level;
- tcmdPtr->startCmd = ckalloc(len);
+ tcmdPtr->startCmd = (char *)ckalloc(len);
memcpy(tcmdPtr->startCmd, command, len);
tcmdPtr->refCount++;
tcmdPtr->stepTrace = Tcl_CreateObjTrace(interp, 0,
@@ -1975,7 +1975,7 @@ TraceVarProc(
int flags) /* OR-ed bits giving operation and other
* information. */
{
- TraceVarInfo *tvarPtr = clientData;
+ TraceVarInfo *tvarPtr = (TraceVarInfo *)clientData;
char *result;
int code, destroy = 0;
Tcl_DString cmd;
@@ -2167,7 +2167,7 @@ Tcl_CreateObjTrace(
iPtr->tracesForbiddingInline++;
}
- tracePtr = ckalloc(sizeof(Trace));
+ tracePtr = (Trace *)ckalloc(sizeof(Trace));
tracePtr->level = level;
tracePtr->proc = proc;
tracePtr->clientData = clientData;
@@ -2230,7 +2230,7 @@ Tcl_CreateTrace(
* command. */
ClientData clientData) /* Arbitrary value word to pass to proc. */
{
- StringTraceData *data = ckalloc(sizeof(StringTraceData));
+ StringTraceData *data = (StringTraceData *)ckalloc(sizeof(StringTraceData));
data->clientData = clientData;
data->proc = proc;
@@ -2264,7 +2264,7 @@ StringTraceProc(
int objc,
Tcl_Obj *const *objv)
{
- StringTraceData *data = clientData;
+ StringTraceData *data = (StringTraceData *)clientData;
Command *cmdPtr = (Command *) commandInfo;
const char **argv; /* Args to pass to string trace proc */
int i;
@@ -2581,7 +2581,7 @@ TclCallVarTraces(
* error, then leave an error message and
* stack trace information in *iPTr. */
{
- register VarTrace *tracePtr;
+ VarTrace *tracePtr;
ActiveVarTrace active;
char *result;
const char *openParen, *p;
@@ -2662,7 +2662,7 @@ TclCallVarTraces(
&& (arrayPtr->flags & traceflags)) {
hPtr = Tcl_FindHashEntry(&iPtr->varTraces, (char *) arrayPtr);
active.varPtr = arrayPtr;
- for (tracePtr = Tcl_GetHashValue(hPtr);
+ for (tracePtr = (VarTrace *)Tcl_GetHashValue(hPtr);
tracePtr != NULL; tracePtr = active.nextTracePtr) {
active.nextTracePtr = tracePtr->nextPtr;
if (!(tracePtr->flags & flags)) {
@@ -2706,7 +2706,7 @@ TclCallVarTraces(
active.varPtr = varPtr;
if (varPtr->flags & traceflags) {
hPtr = Tcl_FindHashEntry(&iPtr->varTraces, (char *) varPtr);
- for (tracePtr = Tcl_GetHashValue(hPtr);
+ for (tracePtr = (VarTrace *)Tcl_GetHashValue(hPtr);
tracePtr != NULL; tracePtr = active.nextTracePtr) {
active.nextTracePtr = tracePtr->nextPtr;
if (!(tracePtr->flags & flags)) {
@@ -2911,7 +2911,7 @@ Tcl_UntraceVar2(
Tcl_VarTraceProc *proc, /* Function assocated with trace. */
ClientData clientData) /* Arbitrary argument to pass to proc. */
{
- register VarTrace *tracePtr;
+ VarTrace *tracePtr;
VarTrace *prevPtr, *nextPtr;
Var *varPtr, *arrayPtr;
Interp *iPtr = (Interp *) interp;
@@ -2944,7 +2944,7 @@ Tcl_UntraceVar2(
flags &= flagMask;
hPtr = Tcl_FindHashEntry(&iPtr->varTraces, (char *) varPtr);
- for (tracePtr = Tcl_GetHashValue(hPtr), prevPtr = NULL; ;
+ for (tracePtr = (VarTrace *)Tcl_GetHashValue(hPtr), prevPtr = NULL; ;
prevPtr = tracePtr, tracePtr = tracePtr->nextPtr) {
if (tracePtr == NULL) {
goto updateFlags;
@@ -3103,7 +3103,7 @@ Tcl_VarTraceInfo2(
hPtr = Tcl_FindHashEntry(&iPtr->varTraces, (char *) varPtr);
if (hPtr) {
- register VarTrace *tracePtr = Tcl_GetHashValue(hPtr);
+ VarTrace *tracePtr = (VarTrace *)Tcl_GetHashValue(hPtr);
if (prevClientData != NULL) {
for (; tracePtr != NULL; tracePtr = tracePtr->nextPtr) {
@@ -3201,10 +3201,10 @@ Tcl_TraceVar2(
* invoked upon varName. */
ClientData clientData) /* Arbitrary argument to pass to proc. */
{
- register VarTrace *tracePtr;
+ VarTrace *tracePtr;
int result;
- tracePtr = ckalloc(sizeof(VarTrace));
+ tracePtr = (VarTrace *)ckalloc(sizeof(VarTrace));
tracePtr->traceProc = proc;
tracePtr->clientData = clientData;
tracePtr->flags = flags;
@@ -3298,7 +3298,7 @@ TraceVarEx(
if (isNew) {
tracePtr->nextPtr = NULL;
} else {
- tracePtr->nextPtr = Tcl_GetHashValue(hPtr);
+ tracePtr->nextPtr = (VarTrace *)Tcl_GetHashValue(hPtr);
}
Tcl_SetHashValue(hPtr, tracePtr);