12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
* Copyright (c) 1998-1999 by Scriptics Corporation.
* Copyright (c) 2001 by Kevin B. Kenny. All rights reserved.
* Copyright (c) 2007 Miguel Sofer
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* RCS: @(#) $Id: tclVar.c,v 1.73.2.70 2010/06/01 13:08:49 dgp Exp $
*/
#include "tclInt.h"
/*
* Prototypes for the variable hash key methods.
*/
|
|
|
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
* Copyright (c) 1998-1999 by Scriptics Corporation.
* Copyright (c) 2001 by Kevin B. Kenny. All rights reserved.
* Copyright (c) 2007 Miguel Sofer
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* RCS: @(#) $Id: tclVar.c,v 1.73.2.71 2010/08/02 12:36:41 dgp Exp $
*/
#include "tclInt.h"
/*
* Prototypes for the variable hash key methods.
*/
|
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
|
if (tablePtr == &iPtr->globalNsPtr->varTable) {
flags |= TCL_GLOBAL_ONLY;
} else if (tablePtr == &currNsPtr->varTable) {
flags |= TCL_NAMESPACE_ONLY;
}
for (varPtr = VarHashFirstVar(tablePtr, &search); varPtr != NULL;
varPtr = VarHashNextVar(&search)) {
/*
* Lie about the validity of the hashtable entry. In this way the
* variables will be deleted by VarHashDeleteTable.
*/
VarHashInvalidateEntry(varPtr);
UnsetVarStruct(varPtr, NULL, iPtr, VarHashGetKey(varPtr), NULL, flags,
-1);
}
VarHashDeleteTable(tablePtr);
}
/*
*----------------------------------------------------------------------
*
|
|
<
<
<
<
<
<
>
|
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
|
if (tablePtr == &iPtr->globalNsPtr->varTable) {
flags |= TCL_GLOBAL_ONLY;
} else if (tablePtr == &currNsPtr->varTable) {
flags |= TCL_NAMESPACE_ONLY;
}
for (varPtr = VarHashFirstVar(tablePtr, &search); varPtr != NULL;
varPtr = VarHashFirstVar(tablePtr, &search)) {
UnsetVarStruct(varPtr, NULL, iPtr, VarHashGetKey(varPtr), NULL, flags,
-1);
VarHashDeleteEntry(varPtr);
}
VarHashDeleteTable(tablePtr);
}
/*
*----------------------------------------------------------------------
*
|