cpython/Modules/expat/pyexpatns.h

/* Copyright (c) 2005-2006 ActiveState Software Inc.
 *
 * Namespace all expat exported symbols to avoid dynamic loading symbol
 * collisions when embedding Python.
 *
 * The Problem:
 * - you embed Python in some app
 * - the app dynamically loads libexpat of version X
 * - the embedded Python imports pyexpat (which was built against
 *   libexpat version X+n)
 * --> pyexpat gets the expat symbols from the already loaded and *older*
 *     libexpat: crash (Specifically the crash we observed was in
 *     getting an old XML_ErrorString (from xmlparse.c) and then calling
 *     it with newer values in the XML_Error enum:
 *
 *       // pyexpat.c, line 1970
 *       ...
 *       // Added in Expat 1.95.7.
 *       MYCONST(XML_ERROR_UNBOUND_PREFIX);
 *       ...
 *
 *
 * The Solution:
 * Prefix all exported symbols with "PyExpat_". This is similar to
 * what Mozilla does for some common libs:
 * http://lxr.mozilla.org/seamonkey/source/modules/libimg/png/mozpngconf.h#115
 *
 * The list of relevant exported symbols can be had with this command:
 *
       nm pyexpat.so \
           | grep -v " [a-zBUA] " \
           | grep -v "_fini\|_init\|initpyexpat"
 *
 * If any of those symbols are NOT prefixed with "PyExpat_" then
 * a #define should be added for it here.
 */

#ifndef PYEXPATNS_H
#define PYEXPATNS_H

#define testingAccountingGetCountBytesDirect
#define testingAccountingGetCountBytesIndirect
#define unsignedCharToPrintable
#define XML_DefaultCurrent
#define XML_ErrorString
#define XML_ExpatVersion
#define XML_ExpatVersionInfo
#define XML_ExternalEntityParserCreate
#define XML_FreeContentModel
#define XML_GetBase
#define XML_GetBuffer
#define XML_GetCurrentByteCount
#define XML_GetCurrentByteIndex
#define XML_GetCurrentColumnNumber
#define XML_GetCurrentLineNumber
#define XML_GetErrorCode
#define XML_GetFeatureList
#define XML_GetIdAttributeIndex
#define XML_GetInputContext
#define XML_GetParsingStatus
#define XML_GetSpecifiedAttributeCount
#define XmlGetUtf16InternalEncoding
#define XmlGetUtf16InternalEncodingNS
#define XmlGetUtf8InternalEncoding
#define XmlGetUtf8InternalEncodingNS
#define XmlInitEncoding
#define XmlInitEncodingNS
#define XmlInitUnknownEncoding
#define XmlInitUnknownEncodingNS
#define XML_MemFree
#define XML_MemMalloc
#define XML_MemRealloc
#define XML_Parse
#define XML_ParseBuffer
#define XML_ParserCreate
#define XML_ParserCreate_MM
#define XML_ParserCreateNS
#define XML_ParserFree
#define XML_ParserReset
#define XmlParseXmlDecl
#define XmlParseXmlDeclNS
#define XmlPrologStateInit
#define XmlPrologStateInitExternalEntity
#define XML_ResumeParser
#define XML_SetAttlistDeclHandler
#define XML_SetBase
#define XML_SetBillionLaughsAttackProtectionActivationThreshold
#define XML_SetBillionLaughsAttackProtectionMaximumAmplification
#define XML_SetCdataSectionHandler
#define XML_SetCharacterDataHandler
#define XML_SetCommentHandler
#define XML_SetDefaultHandler
#define XML_SetDefaultHandlerExpand
#define XML_SetDoctypeDeclHandler
#define XML_SetElementDeclHandler
#define XML_SetElementHandler
#define XML_SetEncoding
#define XML_SetEndCdataSectionHandler
#define XML_SetEndDoctypeDeclHandler
#define XML_SetEndElementHandler
#define XML_SetEndNamespaceDeclHandler
#define XML_SetEntityDeclHandler
#define XML_SetExternalEntityRefHandler
#define XML_SetExternalEntityRefHandlerArg
#define XML_SetHashSalt
#define XML_SetNamespaceDeclHandler
#define XML_SetNotationDeclHandler
#define XML_SetNotStandaloneHandler
#define XML_SetParamEntityParsing
#define XML_SetProcessingInstructionHandler
#define XML_SetReparseDeferralEnabled
#define XML_SetReturnNSTriplet
#define XML_SetSkippedEntityHandler
#define XML_SetStartCdataSectionHandler
#define XML_SetStartDoctypeDeclHandler
#define XML_SetStartElementHandler
#define XML_SetStartNamespaceDeclHandler
#define XML_SetUnknownEncodingHandler
#define XML_SetUnparsedEntityDeclHandler
#define XML_SetUserData
#define XML_SetXmlDeclHandler
#define XmlSizeOfUnknownEncoding
#define XML_StopParser
#define XML_UseForeignDTD
#define XML_UseParserAsHandlerArg
#define XmlUtf16Encode
#define XmlUtf8Encode


#endif /* !PYEXPATNS_H */