From f387b9c021de6e7b6f58011d9b822360628714b2 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith [Google]" Date: Wed, 17 Oct 2018 17:39:12 -0700 Subject: [PATCH] bpo-35011: Restore use of pyexpatns.h in libexpat --- .../next/Build/2018-10-17-17-38-57.bpo-35011.GgoPIC.rst | 4 ++++ Modules/expat/expat_external.h | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 Misc/NEWS.d/next/Build/2018-10-17-17-38-57.bpo-35011.GgoPIC.rst 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 00000000000000..4411ffea45ce96 --- /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 629483a91b27f4..2d96b4f41ad703 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