From: Ashok N. <apn...@ya...> - 2025-05-08 04:40:23
|
Jan, I'm afraid after reviewing the latest 717 implementation, I still have some doubts around compatibility. Assuming I've followed the macros and stubs correctly... If an extension is compiled against 9.0.0, the macro Tcl_CreateHashEntry(tablePtr, key, newPtr) will expand to (*((tablePtr)->createProc))(tablePtr, (const char *)(key), newPtr) Now when the binary extension, *compiled against 9.0.0*, is loaded into 9.0.2 (with TIP 717), that will directly call CreateHashEntry which will then (potentially) return NULL instead of panicing thereby breaking the contract. Am I right or what am I missing? /Ashok ________________________________ From: Jan Nijtmans <jan...@gm...> Sent: Tuesday, May 6, 2025 2:42 PM To: Ashok Nadkarni <apn...@ya...> Cc: Tcl Core List <tcl...@li...> Subject: Re: [TCLCORE] CFV warning: TIP #717: New function: Tcl_AttemptCreateHashEntry() Op di 6 mei 2025 om 06:34 schreef Ashok: > > Just for the record, I would still prefer a stub entry even if the panic gives more useful information with the macro. I now changed the implementation, using 2 new stub entries. @Ashok, thanks for the testcase, I fully see your point! @Don, do you have anything more to add? Thanks for all the feedback. Jan Nijtmans |