From: <apn...@ya...> - 2024-12-01 14:50:19
|
Custom Tcl_Obj's often require a pointer and length internal representation. In Tcl 8, the Tcl_Obj.internalRep.ptrAndLongRep field targeted this use case. With Tcl 9, where supported lengths on 64-bit platforms are greater than ULONG_MAX on Windows, this no longer suffices for the purpose. Hijacking the twoPtrValue field involves casts, not desirable imo. I would therefore like to add the following additional field to the Tcl_ObjIntenalRep union struct { void *ptr; Tcl_Size size; } ptrAndSize; Note Tcl_Size was chosen, not Tcl_WideInt, ptrdiff_t or size_t so that the size of Tcl_Obj is not affected on any platform for both 32- and 64-bit Tcl 9 and 8.7. I would like to see this for 9.0.1. Anybody have objections? Is this something that would need a TIP and a vote? /Ashok |