From: Christian W. <Chr...@t-...> - 2024-09-01 04:07:28
|
Hello TCT, all, I'm puzzled and unhappy over the ongoing changes regarding Tk_GetColor() invocations within Tk, which do not pass the color name string as an explicit Tk_Uid but a string, although Tk_GetColor()'s signature states this being a Tk_Uid. Why is Tk_GetColor(...Tk_Uid name...)? In olden Tk <= 8.0 times the lookup was made per Tk_Uid (address of an interned string) combined with Colormap and X11 Display pointer instead of a direct string. Later Tk versions use a string for the name lookup and manage other properties (the display etc.) by chaining the color table entries independent of the name hash table. My point now is: either we thoroughly follow the current Tk_GetColor() signature and use proper Tk_Uids for the name parameter, or we change the signature to take a const char pointer for the name. The former option would allow for later revision of the lookup to possibly gain from using an integer hash lookup instead of a string hash lookup. But in any case: both described alternatives are at least consistent in themselves whereas the current tip and core-8-branch of Tk's repository with the ongoing changes are not. Best regards, Christian |