]> granicus.if.org Git - python/commitdiff
bpo-35011: Restore use of pyexpatns.h in libexpat (GH-9939)
authorGregory P. Smith <greg@krypto.org>
Thu, 18 Oct 2018 01:10:46 +0000 (18:10 -0700)
committerGitHub <noreply@github.com>
Thu, 18 Oct 2018 01:10:46 +0000 (18:10 -0700)
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.

Misc/NEWS.d/next/Build/2018-10-17-17-38-57.bpo-35011.GgoPIC.rst [new file with mode: 0644]
Modules/expat/expat_external.h

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 (file)
index 0000000..4411ffe
--- /dev/null
@@ -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.
index 629483a91b27f41a031ee12276cae8d2eda0c70a..2d96b4f41ad70351cb3a9fe850f1ae459a1abc6b 100644 (file)
 
 /* 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