Hello,
Please review my patch. Branchable does not accept patches so I stored it in the gist.
It fixes build error by replacing explicit TidyBuffer init with proper function call. Also it prevents a runtime error at tidyOptSetInt.
I successfully compiled and used tidy-enabled Pumpa with this patch.
I added the patch, but this change doesn't go over well with the libtidy in Debian jessie (stable):
It crashes on this error:
I suspect it's a problem due to different versions of the library. Do you have any suggestion? Is adding an #ifdef the only solution?
You are right. I checked tidy versions and found a breaking change between Debian (20091223) and OS X (20061031, very old) versions. An affected parameter TidyBodyOnly changed its type to integer on Debian. Unfortunately libtidy does not provide version numbers so it was needed to parse a release date to distinguish these versions. So the following patch solves an error on Debian by choosing a needed type automatically at runtime.
Please check the patch.