bpo-29591: Upgrade Modules/expat to libexpat 2.2 (#2164) (#2202)
* bpo-29591: Upgrade Modules/expat to libexpat 2.2
* bpo-29591: Restore Python changes on expat
* bpo-29591: Remove expat config of unsupported platforms
Remove the configuration (Modules/expat/*config.h) of unsupported
platforms:
* Amiga
* MacOS Classic on PPC32
* Open Watcom
* bpo-29591: Remove useless XML_HAS_SET_HASH_SALT
The XML_HAS_SET_HASH_SALT define of Modules/expat/expat.h became
useless since our local expat copy was upgrade to expat 2.1 (it's now
expat 2.2.0).
(cherry picked from commit 23ec4b57e1359f9c539b8defc317542173ae087e)
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
index cddbdbe..2b4d312 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -1318,11 +1318,8 @@
Py_DECREF(self);
return NULL;
}
-
-#if XML_COMBINED_VERSION >= 20100 || 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. */
+#if XML_COMBINED_VERSION >= 20100
+ /* This feature was added upstream in libexpat 2.1.0. */
XML_SetHashSalt(self->itself,
(unsigned long)_Py_HashSecret.prefix);
#endif