| ︙ | | |
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
|
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
|
-
-
+
-
|
/*
* We need to remove the interpreter-wide trace which
* we created to allow 'step' traces.
*/
Tcl_DeleteTrace(interp, tcmdPtr->stepTrace);
tcmdPtr->stepTrace = NULL;
if (tcmdPtr->startCmd != NULL) {
Tcl_Free(tcmdPtr->startCmd);
Tcl_Free(tcmdPtr->startCmd);
}
}
if (tcmdPtr->flags & TCL_TRACE_EXEC_IN_PROGRESS) {
/*
* Postpone deletion.
*/
tcmdPtr->flags = 0;
|
| ︙ | | |
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
|
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
|
-
-
+
-
|
if (flags & (TCL_TRACE_DESTROYED | TCL_TRACE_DELETE)) {
int untraceFlags = tcmdPtr->flags;
Tcl_InterpState state;
if (tcmdPtr->stepTrace != NULL) {
Tcl_DeleteTrace(interp, tcmdPtr->stepTrace);
tcmdPtr->stepTrace = NULL;
if (tcmdPtr->startCmd != NULL) {
Tcl_Free(tcmdPtr->startCmd);
Tcl_Free(tcmdPtr->startCmd);
}
}
if (tcmdPtr->flags & TCL_TRACE_EXEC_IN_PROGRESS) {
/*
* Postpone deletion, until exec trace returns.
*/
tcmdPtr->flags = 0;
|
| ︙ | | |
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
|
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
|
-
-
+
-
|
*/
if ((flags & TCL_TRACE_LEAVE_EXEC) && (tcmdPtr->stepTrace != NULL)
&& (level == tcmdPtr->startLevel)
&& (strcmp(command, tcmdPtr->startCmd) == 0)) {
Tcl_DeleteTrace(interp, tcmdPtr->stepTrace);
tcmdPtr->stepTrace = NULL;
if (tcmdPtr->startCmd != NULL) {
Tcl_Free(tcmdPtr->startCmd);
Tcl_Free(tcmdPtr->startCmd);
}
}
/*
* Second, create the tcl callback, if required.
*/
if (call) {
|
| ︙ | | |
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
|
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
|
-
-
+
-
|
TraceExecutionProc, tcmdPtr, CommandObjTraceDeleted);
}
}
if (flags & TCL_TRACE_DESTROYED) {
if (tcmdPtr->stepTrace != NULL) {
Tcl_DeleteTrace(interp, tcmdPtr->stepTrace);
tcmdPtr->stepTrace = NULL;
if (tcmdPtr->startCmd != NULL) {
Tcl_Free(tcmdPtr->startCmd);
Tcl_Free(tcmdPtr->startCmd);
}
}
}
if (call) {
if (tcmdPtr->refCount-- <= 1) {
Tcl_Free(tcmdPtr);
}
}
|
| ︙ | | |