diff options
author | Gregory P. Smith <greg@krypto.org> | 2012-03-15 01:10:37 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@krypto.org> | 2012-03-15 01:10:37 (GMT) |
commit | 2522771e4707cea379510d3196d877c92408f6d3 (patch) | |
tree | 342e2d40ef045d0af1f1b3baa76301ec3bd20eaf /Modules/pyexpat.c | |
parent | 4552b2eccce8333521895d5212e324feb1dcc776 (diff) | |
download | cpython-2522771e4707cea379510d3196d877c92408f6d3.zip cpython-2522771e4707cea379510d3196d877c92408f6d3.tar.gz cpython-2522771e4707cea379510d3196d877c92408f6d3.tar.bz2 |
Fixes Issue 14234: fix for the previous commit, keep compilation when
using --with-system-expat working when the system expat does not have
salted hash support.
Diffstat (limited to 'Modules/pyexpat.c')
-rw-r--r-- | Modules/pyexpat.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c index c1142de..bf81e2a 100644 --- a/Modules/pyexpat.c +++ b/Modules/pyexpat.c @@ -1150,8 +1150,13 @@ newxmlparseobject(char *encoding, char *namespace_separator, PyObject *intern) else { self->itself = XML_ParserCreate(encoding); } +#if ((XML_MAJOR_VERSION >= 2) && (XML_MINOR_VERSION >= 1)) || defined(XML_HAS_SET_HASH_SALT) + /* This feature was added upstream in libexpat 2.1.0. Our expat copy + * has a backport of this feature where we also define XML_HAS_SET_HASH_SALT + * to indicate that we can still use it. */ XML_SetHashSalt(self->itself, (unsigned long)_Py_HashSecret.prefix); +#endif self->intern = intern; Py_XINCREF(self->intern); PyObject_GC_Track(self); |