[Python-checkins] [3.7] bpo-35011: Restore use of pyexpatns.h in libexpat (GH-9939) (GH-9940)

Miss Islington (bot) webhook-mailer at python.org
Wed Oct 17 22:06:34 EDT 2018


https://github.com/python/cpython/commit/35ae99d7b394af0ce01460f7bccd7449a82289ad
commit: 35ae99d7b394af0ce01460f7bccd7449a82289ad
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-10-17T19:06:30-07:00
summary:

[3.7] bpo-35011: Restore use of pyexpatns.h in libexpat (GH-9939) (GH-9940)



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/5dc3f23b5fb0b510926012cb3732dae63cddea60GH-diff-3afaf7274c90ce1b7405f75ad825f545 inadvertently removed it when upgrading expat.
(cherry picked from commit 9d4712bc8f26bf1d7e626b53ab092fe030bcd68d)


Co-authored-by: Gregory P. Smith <greg at krypto.org>


https://bugs.python.org/issue35011

files:
A Misc/NEWS.d/next/Build/2018-10-17-17-38-57.bpo-35011.GgoPIC.rst
M 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
index 000000000000..4411ffea45ce
--- /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 629483a91b27..2d96b4f41ad7 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



More information about the Python-checkins mailing list