Skip to content
Snippets Groups Projects
Unverified Commit 6312c105 authored by Yilei "Dolee" Yang's avatar Yilei "Dolee" Yang Committed by GitHub
Browse files

bpo-46784: Add newly exported expat symbols to the namespace. (GH-31397)


The libexpat 2.4.1 upgrade from  introduced the following new exported symbols:

* `testingAccountingGetCountBytesDirect`
* `testingAccountingGetCountBytesIndirect`
* `unsignedCharToPrintable`
* `XML_SetBillionLaughsAttackProtectionActivationThreshold`
* `XML_SetBillionLaughsAttackProtectionMaximumAmplification`

We need to adjust [Modules/expat/pyexpatns.h](https://github.com/python/cpython/blob/master/Modules/expat/pyexpatns.h)

(The newer libexpat upgrade  has no new symbols).

Automerge-Triggered-By: GH:gpshead
parent 892ff93d
No related branches found
No related tags found
No related merge requests found
Fix libexpat symbols collisions with user dynamically loaded or statically linked libexpat in embedded Python.
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment