Why are empty Indexed*Identifier checked for ref counting?

David Nolden zwabel at googlemail.com
Wed May 5 20:47:03 UTC 2010


2010/5/5 Milian Wolff <mail at milianw.de>:
>> The difference is that for the empty string, we don't need the "item"
>> from the repository, while for the empty identifier we need.
>
> One more stupid question from my side: Why do we need the item? It's empty
> after all. Or is this because we need to save that it is empty? IndexedStrings
> are also saved somehow, how is it done there?

The non-indexed identifiers (aka. Identifier or QualifiedIdentifier)
take a pointer to such an item, and use it directly as a kind of
d-pointer, so we also need an item for the "empty" objects to get a
consistent handling there.

Greetings, David




More information about the KDevelop-devel mailing list