Comment 4 for bug 2045435

Revision history for this message
scoder (scoder) wrote :

There are two issues here. One is the incorrect cast that Cython generates. The second issue, that @colindean mentions, is due to incompatibilities in libxml2 versions. They added some 'const' modifiers to their API in 2.12.x which lxml now adheres to. This leads to warnings (or, in your case, errors) in older libxml2 versions. The way the code goes is actually correct: I'm now passing a const requiring function into the old function pointer that doesn't care about const (or not). But it seems that clang still complains about it.

As much as I dislike doing this, I'll add casts to silence the warnings (and, sadly, any real future errors that might occur). That solves a larger part of this problem in real-world environments. It'll be in 5.0.1.