Skip to content
Tcl Source Code Artifact [73d0f1529b]
Login

Artifact [73d0f1529b]

Artifact 73d0f1529b845a1908870d11f28ceb5a12776f09:

Wiki page [Object System and Fundamental Object Types] by dgp on 2014-09-15 01:30:10.
D 2014-09-15T01:30:10.120
L Object\sSystem\sand\sFundamental\sObject\sTypes
P b130c9110842355ed49c14c3712d7fc3c5d757f8
U dgp
W 858
This is a huge module containing the fundamental base code that
represents and manipulates values in Tcl, as well as many foundations
that rests on, as well as several of the built-in Tcl_ObjTypes.

For analysis, it helps to break it down futher.

  *  [Encoding]
  *  [Hash Tables]
  *  [Object Type Registration]
  *  [Tcl_Obj System]
  *  [numeric Object Types]
  *  [string Object Type]
  *  [end-offset Object Type]
  *  [List Parsing]
  *  [String Processing]
  *  [Dynamic Strings]
  *  [Global Values]
  *  [Other Utilities]

Critical defect here: much of the API uses a <i>signed int</i> 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).
Z 0a667d4bdd2f90106527917352cc07e7