Next: 3.3.6 Other Operations on
Up: 3.3 Class Tcl
Previous: 3.3.4 Error Reporting and
Contents
Index
3.3.5 Hash Functions within the Interpreter
ns stores a reference to every TclObject in the compiled hierarchy
in a hash table;
this permits quick access to the objects.
The hash table is internal to the interpreter.
ns uses the name of the TclObject as the key
to enter, lookup, or delete the TclObject in the hash table.
- *
- [TclObject*
]tcl.enter../Tcl/Tcl.ccTcl::enter
will insert a pointer to the TclObject
into the hash table.
It is used by
[]TclClass::create_shadow../Tcl/Tcl.ccTclClass::create_shadow
to insert an object into the table, when that object is created.
- *
- [char*
]tcl.lookup../Tcl/Tcl.hTcl::lookup
will retrieve the TclObject with the name
.
It is used by
[]TclObject::lookup../Tcl/Tcl.hTclObject::lookup.
- *
- [TclObject*
]tcl.remove../Tcl/Tcl.ccTcl::remove
will delete references to the TclObject
from the hash table.
It is used by
[]TclClass::delete_shadow../Tcl/Tcl.ccTclClass::delete_shadow
to remove an existing entry from the hash table,
when that object is deleted.
These functions are used internally by
the class TclObject and class TclClass.
Next: 3.3.6 Other Operations on
Up: 3.3 Class Tcl
Previous: 3.3.4 Error Reporting and
Contents
Index
2008-05-16