Update of ”Tcl_Obj System”
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

Artifact ID: 8f6b9609330e54477634f04f904e05ebfe7f90d5
Page Name:Tcl_Obj System
Date: 2014-09-15 20:39:23
Original User: dgp
Parent: 73d68babc75501735b30e0b9ce8a172f24648139 (diff)
Next a871917bcb7552d5c2aa88d9c28a72346e535268
Content

Source Files

Public Routines

Private Routines

Directly Depends On Public Routines From

Directly Depends On Private Routines From

Discussion

If extensions need TclObjBeingDeleted then it should be public. Otherwise it should be file static.

TclFreeIntRep should be public. There should be no direct calling of another object type's procs.

There's code duplication in TclHashObjKey cribbed from Hash Tables.

Critical defect here: much of the API uses a signed int for object lengths (with negative numbers, typically -1, indicating “use strlen() to get the real length”). This is fine on 32-bit platforms, but massively wrong on 64-bit (except for ILP64 architectures, but that's a rare configuration).

There's a single avenue for transforming from one arbitrary object type to another -- through the string rep. This is effective, but limiting. Fully internal transformations cheat to avoid the problems, notably list to dict and back. This suggests alternative exchange forms could be useful. The two that come to mind are containers -- effectively lists -- and bytearrays.

There's only a single alternative intrep recalled at any time. This is sometimes unwelcome, and a fair bit of trickery is employed in places to avoid loss of a particularly precious intrep. Some consideration of a larger number of alternative representations able to co-exist might be taken. (Pros and cons)