]> git.saurik.com Git - apt.git/commit - apt-private/private-show.cc
rewrite all TFRewrite instances to use the new pkgTagSection::Write
authorDavid Kalnischkies <david@kalnischkies.de>
Mon, 11 May 2015 13:08:08 +0000 (15:08 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Mon, 11 May 2015 15:22:33 +0000 (17:22 +0200)
commit88593886a42025d51d76051da5929b044e42efee
tree6212ec08e3ac872573ca5faefb400a7914051bee
parent8d058ea53b18348f81229049a27d14282bd8d8c1
rewrite all TFRewrite instances to use the new pkgTagSection::Write

While it is mostly busywork to rewrite all instances it actually fixes
bugs as the data storage used by the new method is std::string rather
than a char*, the later mostly created by c_str() from a std::string
which the caller has to ensure keeps in scope – something apt-ftparchive
actually didn't ensure and relied on copy-on-write behavior instead
which c++11 forbids and hence the new default gcc abi doesn't use it.
16 files changed:
apt-pkg/depcache.cc
apt-pkg/indexcopy.cc
apt-pkg/indexcopy.h
apt-private/private-show.cc
cmdline/apt-cache.cc
cmdline/apt-sortpkgs.cc
ftparchive/apt-ftparchive.cc
ftparchive/contents.cc
ftparchive/contents.h
ftparchive/multicompress.cc
ftparchive/multicompress.h
ftparchive/writer.cc
ftparchive/writer.h
test/integration/test-apt-cli-show
test/libapt/indexcopytosourcelist_test.cc
test/libapt/tagsection_test.cc [new file with mode: 0644]