Figure 3: In Tcl 8.0 and later versions, Tcl_Obj structures are used to represent most data. A Tcl_Obj can hold a string value (with length) and also an equivalent but more efficient internal representation. Small internal representations can be stored directly in the Tcl_Obj; larger values are allocated separately with a pointer stored in the Tcl_Obj. The type field identifies the current form of the internal representation and makes the internal representation mechanism extensible. The reference count allows Tcl_Objs to be shared.
Copyright © 1999, Dr. Dobb's Journal