libapt-pkg: Are cache offsets part of the library interface?
Hi,
I need a small clarification on the apt-pkg library interface: Which
methods for comparing strings (like package name, origin or archive) are
officially supported (all three seem to work):
- Getting the string via the iterator and using strcmp(). I believe
this is the proper way to do it, yet it needs lots of cycles.
- Getting the string via the iterator and comparing string pointers
using ==. This works as long as the strings are properly interned
during cache generation.
- Comparing offsets into the string table, e.g.
PkgFileIterator->Archive. This depends on the cache implementation
and also requires strings to be interned properly.
All three methods belong to the "public" interface, but I'm not sure
this is intended.
TIA,
Simon
Reply to: