Restore the apt ABI.
authorDaniel Burrows <Daniel_Burrows@alumni.brown.edu>
Fri, 26 Sep 2008 01:24:09 +0000 (18:24 -0700)
committerDaniel Burrows <Daniel_Burrows@alumni.brown.edu>
Fri, 26 Sep 2008 01:24:09 +0000 (18:24 -0700)
commitf7dec19f5ce3b876c5d2eaeb2d26cf513780c935
treee5c88a40f52279f8bb8e711f5c443b97976ebac6
parentdb3ae806f4e6af7f419cdea9e89b00fb2812b31e
Restore the apt ABI.
The problem was that the size of pkgDpkgPM and its member offsets
changed because a map giving the names of the trigger states was
inserted into the middle of the structure.  I fixed it by using a
statically allocated array instead.  This changes the procedure for
looking up a string to a linear search, which should be fine (or
even faster than before) since there are only 4 state strings.  If
it becomes a problem, sorting the array by key will allow us to use
std::equal_range(), but I would advise against this unless it's
really necessary, since sooner or later someone will forget to maintain
the sort order.
apt-pkg/deb/dpkgpm.cc
apt-pkg/deb/dpkgpm.h
debian/changelog