Artifact
73d68babc75501735b30e0b9ce8a172f24648139:
Wiki page
[Tcl_Obj System] by
dgp
2014-09-15 20:33:42.
D 2014-09-15T20:33:42.795
L Tcl_Obj\sSystem
P b474a1501ed65839625d99a6ac0356820211b439
U dgp
W 1368
<h1>Source Files</h1>
* portions of [/finfo?name=generic/tclObj.c|tclObj.c]
<h1>Public Routines</h1>
* Tcl_NewObj
* Tcl_DbNewObj
* TclFreeObj
* Tcl_DuplicateObj
* Tcl_GetString
* Tcl_GetStringFromObj
* Tcl_InvalidateStringRep
* Tcl_DbIncrRefCount
* Tcl_DbDecrRefCount
* Tcl_DbIsShared
* Tcl_InitObjHashTable
<h1>Private Routines</h1>
* TclObjBeingDeleted
* TclSetDuplicateObj
* TclCompareObjKeys
* TclFreeObjEntry
* TclHashObjKey
* Tcl_RepresentationCmd
* TclFreeIntRep
<h1>Directly Depends On Public Routines From</h1>
* [Allocation]
* [Hash Tables]
* [Threads]
<h1>Directly Depends On Private Routines From</h1>
* [Event Loops]
<h1>Discussion</h1>
If extensions need <b>TclObjBeingDeleted</b> then it
should be public. Otherwise it should be file static.
<b>TclFreeIntRep</b> should be public. There should be
no direct calling of another object type's procs.
There's code duplication in <b>TclHashObjKey</b> cribbed from
[Hash Tables].
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 ba94f1ac90e26e2b69a8c96242483a5e