| ︙ | | |
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
|
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
|
-
+
-
+
|
Tcl_Size level,
const char *command,
Tcl_Command commandInfo,
Tcl_Size objc,
Tcl_Obj *const objv[])
{
TraceWrapperInfo *info = (TraceWrapperInfo *)clientData;
if (objc > INT_MAX) {
if (objc > INT_MAX || objc < 0) {
objc = -1; /* Signal Tcl_CmdObjTraceProc that objc is out of range */
}
return info->proc(info->clientData, interp, (int)level, command, commandInfo, objc, objv);
return info->proc(info->clientData, interp, (int)level, command, commandInfo, (int)objc, objv);
}
static void
traceWrapperDelProc(
void *clientData)
{
TraceWrapperInfo *info = (TraceWrapperInfo *)clientData;
|
| ︙ | | |
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
|
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
|
-
-
+
+
|
/*
* Invoke the command function. Note that we cast away const-ness on two
* parameters for compatibility with legacy code; the code MUST NOT modify
* either command or argv.
*/
data->proc(data->clientData, interp, level, (char *) command,
cmdPtr->proc, cmdPtr->clientData, objc, argv);
data->proc(data->clientData, interp, (int)level, (char *) command,
cmdPtr->proc, cmdPtr->clientData, (int)objc, argv);
TclStackFree(interp, (void *) argv);
return TCL_OK;
}
/*
*----------------------------------------------------------------------
|
| ︙ | | |
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
|
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
|
-
+
|
int
TclCheckArrayTraces(
Tcl_Interp *interp,
Var *varPtr,
Var *arrayPtr,
Tcl_Obj *name,
int index)
Tcl_Size index)
{
int code = TCL_OK;
if (varPtr && (varPtr->flags & VAR_TRACED_ARRAY)
&& (TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr))) {
Interp *iPtr = (Interp *)interp;
|
| ︙ | | |
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
|
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
|
-
+
|
Tcl_Obj *part2Ptr, /* Variable's two-part name. */
int flags, /* Flags passed to trace functions: indicates
* what's happening to variable, plus maybe
* TCL_GLOBAL_ONLY or TCL_NAMESPACE_ONLY */
int leaveErrMsg, /* If true, and one of the traces indicates an
* error, then leave an error message and
* stack trace information in *iPTr. */
int index) /* Index into the local variable table of the
Tcl_Size index) /* Index into the local variable table of the
* variable, or -1. Only used when part1Ptr is
* NULL. */
{
const char *part1, *part2;
if (!part1Ptr) {
part1Ptr = localName(iPtr->varFramePtr, index);
|
| ︙ | | |
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
|
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
|
-
+
|
if (*p == '(') {
openParen = p;
do {
p++;
} while (*p != '\0');
p--;
if (*p == ')') {
int offset = (openParen - part1);
Tcl_Size offset = (openParen - part1);
char *newPart1;
Tcl_DStringInit(&nameCopy);
Tcl_DStringAppend(&nameCopy, part1, p-part1);
newPart1 = Tcl_DStringValue(&nameCopy);
newPart1[offset] = 0;
part1 = newPart1;
|
| ︙ | | |