summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Misc/NEWS.d/next/Library/2022-02-18-22-10-30.bpo-46784.SVOQJx.rst1
-rw-r--r--Modules/expat/pyexpatns.h5
2 files changed, 6 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2022-02-18-22-10-30.bpo-46784.SVOQJx.rst b/Misc/NEWS.d/next/Library/2022-02-18-22-10-30.bpo-46784.SVOQJx.rst
new file mode 100644
index 0000000..d190816
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2022-02-18-22-10-30.bpo-46784.SVOQJx.rst
@@ -0,0 +1 @@
+Fix libexpat symbols collisions with user dynamically loaded or statically linked libexpat in embedded Python.
diff --git a/Modules/expat/pyexpatns.h b/Modules/expat/pyexpatns.h
index cfb742e..d45d9b6 100644
--- a/Modules/expat/pyexpatns.h
+++ b/Modules/expat/pyexpatns.h
@@ -38,6 +38,9 @@
#ifndef PYEXPATNS_H
#define PYEXPATNS_H
+#define testingAccountingGetCountBytesDirect PyExpat_testingAccountingGetCountBytesDirect
+#define testingAccountingGetCountBytesIndirect PyExpat_testingAccountingGetCountBytesIndirect
+#define unsignedCharToPrintable PyExpat_unsignedCharToPrintable
#define XML_DefaultCurrent PyExpat_XML_DefaultCurrent
#define XML_ErrorString PyExpat_XML_ErrorString
#define XML_ExpatVersion PyExpat_XML_ExpatVersion
@@ -81,6 +84,8 @@
#define XML_ResumeParser PyExpat_XML_ResumeParser
#define XML_SetAttlistDeclHandler PyExpat_XML_SetAttlistDeclHandler
#define XML_SetBase PyExpat_XML_SetBase
+#define XML_SetBillionLaughsAttackProtectionActivationThreshold PyExpat_XML_SetBillionLaughsAttackProtectionActivationThreshold
+#define XML_SetBillionLaughsAttackProtectionMaximumAmplification PyExpat_XML_SetBillionLaughsAttackProtectionMaximumAmplification
#define XML_SetCdataSectionHandler PyExpat_XML_SetCdataSectionHandler
#define XML_SetCharacterDataHandler PyExpat_XML_SetCharacterDataHandler
#define XML_SetCommentHandler PyExpat_XML_SetCommentHandler