From: Ashok N. <apn...@ya...> - 2025-05-01 15:06:06
|
Jan, First, thanks for the considerable time you have spent on poking at 716. It is appreciated. I will summarize the discussion and points you brought up in the TIP. In any case, I do not plan on a CFV until the options for proceeding are discussed in the next meeting. Regarding your comment below, regarding 9.0.0/9.0.1 because it is not true for all Windows platforms supported by 9.0 and not all Windows API's, I would hesitate to say it works fine. /Ashok ________________________________ From: Jan Nijtmans Sent: Wednesday, April 30, 2025 4:13 PM To: Ashok Nadkarni Cc: Tcl Core List Subject: Re: [TCLCORE] TIP 716 ready for comments Op wo 30 apr 2025 om 09:43 schreef Jan Nijtmans: > > The following idiom I presume you are referring to, > > > > Tcl_UtfToExternalDString(NULL,...,&ds); > > CreateFileA(Tcl_Value(&ds)...); For completeness, another idiom I'm referring to: const char *str = Tcl_GetStringFromObj(....) CreateFileA(str, ...) Surprisingly many extensions use that. In 8.x it works fine, as long as the filename is restricted to ASCII. In 9.0.0/9.0.1 it works fine as long as the filename is restricted to UTF-8 ;-). With TIP #716 it works fine as long as the filename is restricted to ASCII (which is the same brokenness as 8.x ...) It's up to you how to incorporate this information in the TIP text, or - if you want - leave it out. Some examples: https://sqlite.org/src/file?name=src/tclsqlite.c&ci=ba7d5bad32ad6aac&ln=2604 https://github.com/auriocus/VecTcl/blame/master/WavReader/generic/wavreader.c (line 88) Regards, Jan Nijtmans |