summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2007-08-04 18:32:27 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2007-08-04 18:32:27 (GMT)
commit5f27bf51933b916e9e5c01a9403a74ef83741b6a (patch)
tree2d828b3d553ad34b9c79c634979526e3a7d04876 /generic/tclInt.h
parentf234f8dce1ac71dd3a9aa6bfb4d1e48bb0c986ba (diff)
downloadtcl-5f27bf51933b916e9e5c01a9403a74ef83741b6a.zip
tcl-5f27bf51933b916e9e5c01a9403a74ef83741b6a.tar.gz
tcl-5f27bf51933b916e9e5c01a9403a74ef83741b6a.tar.bz2
modifs to help itcl adapt to VarReform
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r--generic/tclInt.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 5f47fcc..5aae19d 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclInt.h,v 1.327 2007/08/03 13:51:40 dkf Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.328 2007/08/04 18:32:27 msofer Exp $
*/
#ifndef _TCLINT
@@ -204,6 +204,13 @@ typedef struct TclVarHashTable {
struct Namespace *nsPtr;
} TclVarHashTable;
+/*
+ * This is for itcl - it likes to search our varTables directly :(
+ */
+
+#define TclVarHashFindVar(tablePtr, key) \
+ TclVarHashCreateVar((tablePtr), (key), NULL)
+
/*
* The structure below defines a namespace.
@@ -631,7 +638,7 @@ typedef struct VarInHash {
#define VAR_IN_HASHTABLE 0x4
#define VAR_DEAD_HASH 0x8
#define VAR_ARRAY_ELEMENT 0x1000
-#define VAR_NAMESPACE_VAR 0x2000
+#define VAR_NAMESPACE_VAR 0x80 /* KEEP OLD VALUE for Itcl */
#define VAR_ALL_HASH (VAR_IN_HASHTABLE|VAR_DEAD_HASH|VAR_NAMESPACE_VAR|VAR_ARRAY_ELEMENT)
@@ -641,7 +648,7 @@ typedef struct VarInHash {
#define VAR_TRACED_WRITE 0x20 /* TCL_TRACE_WRITES */
#define VAR_TRACED_UNSET 0x40 /* TCL_TRACE_UNSETS */
#define VAR_TRACED_ARRAY 0x800 /* TCL_TRACE_ARRAY */
-#define VAR_TRACE_ACTIVE 0x80
+#define VAR_TRACE_ACTIVE 0x2000
#define VAR_SEARCH_ACTIVE 0x4000
#define VAR_ALL_TRACES \
(VAR_TRACED_READ|VAR_TRACED_WRITE|VAR_TRACED_ARRAY|VAR_TRACED_UNSET)
@@ -690,10 +697,8 @@ typedef struct VarInHash {
(varPtr)->flags &= ~VAR_TRACE_ACTIVE
#define TclSetVarNamespaceVar(varPtr) \
- if (TclIsVarInHash(varPtr) && ! TclIsVarNamespaceVar(varPtr)) {\
- (varPtr)->flags |= VAR_NAMESPACE_VAR;\
- ((VarInHash *)(varPtr))->refCount++;\
- }
+ (varPtr)->flags |= VAR_NAMESPACE_VAR;\
+ ((VarInHash *)(varPtr))->refCount++
#define TclClearVarNamespaceVar(varPtr) \
if (TclIsVarNamespaceVar(varPtr)) {\