From: <apn...@ya...> - 2024-12-02 00:01:08
|
+1 to Brian’s point. Applies to extensions as well. At the very least I hesitate to include it in this TIP as it would make it far more controversial in my opinion. TIP coming up… From: Brian Griffin <bri...@ea...> Sent: Monday, December 2, 2024 5:02 AM To: Jan Nijtmans <jan...@gm...> Cc: apn...@ya...; tcl...@li... Subject: Re: [TCLCORE] Proposed addition of a new Tcl_Obj internal rep field for pointer+size I think the number of changes that you had to make in the core is a good example why this is not a good idea anywhere outside of a major version release, unfortunately. Although, I do applaud the approach to simplify coding. -Brian (from mobile device) On Dec 1, 2024, at 15:03, Jan Nijtmans <jan...@gm... <mailto:jan...@gm...> > wrote: Op zo 1 dec 2024 om 15:50 schreef apnmbx-public--- via Tcl-Core: I would therefore like to add the following additional field to the Tcl_ObjIntenalRep union struct { void *ptr; Tcl_Size size; } ptrAndSize; We could also take the opportunity to simplify things. How about adding anonymous structures to the union: struct { void *ptr; void *ptr2; }; struct { Tcl_Size size; Tcl_Size size2; }; That would enable us to write "size2" in stead of "ptrAndSize.size2", and also "ptr" in stead of "twoPtrValue.ptr1". It would simplty a lot lines of code, making it more readable: <https://core.tcl-lang.org/tcl/info/bf304129948c281a> Regards, Jan Nijtmans _______________________________________________ Tcl-Core mailing list Tcl...@li... <mailto:Tcl...@li...> https://lists.sourceforge.net/lists/listinfo/tcl-core |