GNOME Bugzilla – Bug 352257
improved the function which returns if two objects are identical
Last modified: 2006-08-23 12:31:35 UTC
If the objects have same name, index and parent, the function should return TRUE. In case of tree items for java applications, the function returns FALSE, instead of TRUE, because the parents pointers are different.
Created attachment 71303 [details] [review] Improved isSameObject() function to determine if two object are identical
This looks OK to me, but I'd like to see some documentation in there saying what is going on. For example, something such as "When we're looking at children of objects that manage their descendants, we will often get different objects that point to the same logical child. We want to be able to determine if two objects are in fact pointing to the same child. If we cannot do so easily (i.e., object equivalence), we examine the hierarchy and the object index at each level." Something like that, but you can use your own words to describe it. :-)
Created attachment 71434 [details] [review] Added some code comments
Thanks! Please commit.
Patch committed to CVS head.