cpython: db27b7353400 (original) (raw)

Mercurial > cpython

changeset 75679:db27b7353400

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.

Gregory P. Smith greg@krypto.org
date Wed, 14 Mar 2012 18:11:46 -0700
parents d97ae725814c(current diff)b2d4a6a9463e(diff)
children dcf39147deeb
files Modules/pyexpat.c
diffstat 2 files changed, 7 insertions(+), 0 deletions(-)[+] [-] Modules/expat/expat.h 2 Modules/pyexpat.c 5

line wrap: on

line diff

--- a/Modules/expat/expat.h +++ b/Modules/expat/expat.h @@ -892,6 +892,8 @@ XMLPARSEAPI(int) XML_SetHashSalt(XML_Parser parser, unsigned long hash_salt); +#define XML_HAS_SET_HASH_SALT /* Python Only: Defined for pyexpat.c. / + / If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then XML_GetErrorCode returns information about the error. */

--- a/Modules/pyexpat.c +++ b/Modules/pyexpat.c @@ -1156,8 +1156,13 @@ newxmlparseobject(char *encoding, char * else { self->itself = XML_ParserCreate(encoding); } +#if ((XML_MAJOR_VERSION >= 2) && (XML_MINOR_VERSION >= 1)) || defined(XML_HAS_SET_HASH_SALT)

+#endif self->intern = intern; Py_XINCREF(self->intern); PyObject_GC_Track(self);