Skip to content
Tcl Source Code Artifact [e491badfb3]
Login

Artifact [e491badfb3]

Artifact e491badfb34de4b6ab37fba8a9eed911aab33521:

Wiki page [Object System and Fundamental Object Types] by dgp on 2014-09-11 16:48:32.
D 2014-09-11T16:48:32.896
L Object\sSystem\sand\sFundamental\sObject\sTypes
P 0e6df52ff45a040aa3b2eb0bb64e7ebe229a76ff
U dgp
W 772
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]
  *  [Tcl_Obj System]
  *  [string Object Type]
  *  [end-offset Object Type]
  *  [List Parsing]
  *  [String Processing]
  *  [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 c2524fd485d96b8f9890993807e1749c