Hi, On Sun, 2017-03-12 at 00:38 +0100, Matthew Brincke wrote: > the attached patch on this e-mail should be complete now. Then I think it's > correct, I have tested it now (test code also attached).
erm, well, it's still incomplete, still causing build break: podofo/trunk/src/doc/PdfOutlines.cpp:127:6: error: prototype for ‘void PoDoFo::PdfOutlineItem::InsertChildInternal(const PoDoFo::PdfOutlineItem*, bool)’ does not match any in class ‘PoDoFo::PdfOutlineItem’ void PdfOutlineItem::InsertChildInternal( const PdfOutlineItem* pItem, bool bCheckParent ) ^~~~~~~~~~~~~~ In file included from podofo/trunk/src/doc/PdfOutlines.cpp:34:0: podofo/trunk/src/doc/PdfOutlines.h:223:10: error: candidate is: void PoDoFo::PdfOutlineItem::InsertChildInternal(PoDoFo::PdfOutlineItem*, bool) void InsertChildInternal( PdfOutlineItem* pItem, bool bCheckParent ); And the patch is wrong anyway, the pItem cannot be 'const'. And I do want to insert a subtree, not only one node at a time. > just partial-linking to my PdfOutlines version, otherwise using > the Debian stretch libpodofo0.9.4 due to security policy Why? Why? Why? Why do you use outdated PoDoFo version in an obscure way? I do not understand it. You do not build into the system prefix, do you? I do not understand it. You even do not need to 'make install' to test your code. Having a svn checkout with a well-setup svn (to make 'diff' called with '-up' argument) would save you, and all interested, plenty of time. And a shame as well. > I mean that g++ 5.2 -fsanitize=address (AddressSanitizer) claimed > lines 82 and 90 as sources of memory leaks I believe it's because of your change, namely these lines: // insert only the item itself, without references to others pItemCopy->SetNext( NULL ); pItemCopy->SetFirst( NULL ); To sum it, your patch is not correct, I'm sorry. Bye, zyx -- http://www.litePDF.cz i...@litepdf.cz ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users