summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2018-10-18 01:10:46 (GMT)
committerGitHub <noreply@github.com>2018-10-18 01:10:46 (GMT)
commit9d4712bc8f26bf1d7e626b53ab092fe030bcd68d (patch)
tree0abf304eaa61dbcebb810246bacabdd2b12962e0
parent74a8b6ea7e0a8508b13a1c75ec9b91febd8b5557 (diff)
downloadcpython-9d4712bc8f26bf1d7e626b53ab092fe030bcd68d.zip
cpython-9d4712bc8f26bf1d7e626b53ab092fe030bcd68d.tar.gz
cpython-9d4712bc8f26bf1d7e626b53ab092fe030bcd68d.tar.bz2
bpo-35011: Restore use of pyexpatns.h in libexpat (GH-9939)
Restores the use of pyexpatns.h to isolate our embedded copy of the expat C library so that its symbols do not conflict at link or dynamic loading time with an embedding application or other extension modules with their own version of libexpat. https://github.com/python/cpython/commit/5dc3f23b5fb0b510926012cb3732dae63cddea60#diff-3afaf7274c90ce1b7405f75ad825f545 inadvertently removed it when upgrading expat.
-rw-r--r--Misc/NEWS.d/next/Build/2018-10-17-17-38-57.bpo-35011.GgoPIC.rst4
-rw-r--r--Modules/expat/expat_external.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Build/2018-10-17-17-38-57.bpo-35011.GgoPIC.rst b/Misc/NEWS.d/next/Build/2018-10-17-17-38-57.bpo-35011.GgoPIC.rst
new file mode 100644
index 0000000..4411ffe
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2018-10-17-17-38-57.bpo-35011.GgoPIC.rst
@@ -0,0 +1,4 @@
+Restores the use of pyexpatns.h to isolate our embedded copy of the expat C
+library so that its symbols do not conflict at link or dynamic loading time
+with an embedding application or other extension modules with their own
+version of libexpat.
diff --git a/Modules/expat/expat_external.h b/Modules/expat/expat_external.h
index 629483a..2d96b4f 100644
--- a/Modules/expat/expat_external.h
+++ b/Modules/expat/expat_external.h
@@ -35,6 +35,10 @@
/* External API definitions */
+/* Namespace external symbols to allow multiple libexpat version to
+ co-exist. */
+#include "pyexpatns.h"
+
#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
# define XML_USE_MSC_EXTENSIONS 1
#endif