mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-23 02:50:08 +03:00
globals: Don't store xmlParserVersion in global state
This is a constant.
This commit is contained in:
parent
0830fcfa90
commit
2e6c49a74d
15
globals.c
15
globals.c
@ -202,13 +202,6 @@ xmlPosixStrdup(const char *cur) {
|
||||
xmlStrdupFunc xmlMemStrdup = xmlPosixStrdup;
|
||||
#endif /* DEBUG_MEMORY_LOCATION */
|
||||
|
||||
/**
|
||||
* xmlParserVersion:
|
||||
*
|
||||
* Constant string describing the internal version of the library
|
||||
*/
|
||||
const char *xmlParserVersion = LIBXML_VERSION_STRING LIBXML_VERSION_EXTRA;
|
||||
|
||||
/**
|
||||
* xmlBufferAllocScheme:
|
||||
*
|
||||
@ -747,7 +740,6 @@ xmlInitGlobalState(xmlGlobalStatePtr gs) {
|
||||
gs->gs_xmlLineNumbersDefaultValue = xmlLineNumbersDefaultValueThrDef;
|
||||
gs->gs_xmlLoadExtDtdDefaultValue = xmlLoadExtDtdDefaultValueThrDef;
|
||||
gs->gs_xmlParserDebugEntities = xmlParserDebugEntitiesThrDef;
|
||||
gs->gs_xmlParserVersion = LIBXML_VERSION_STRING;
|
||||
gs->gs_xmlPedanticParserDefaultValue = xmlPedanticParserDefaultValueThrDef;
|
||||
gs->gs_xmlSaveNoEmptyTags = xmlSaveNoEmptyTagsThrDef;
|
||||
gs->gs_xmlSubstituteEntitiesDefaultValue =
|
||||
@ -1144,5 +1136,12 @@ xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc fun
|
||||
#define XML_OP XML_DEFINE_GLOBAL_WRAPPER
|
||||
XML_GLOBALS
|
||||
#undef XML_OP
|
||||
|
||||
/* For backward compatibility */
|
||||
|
||||
const char *const *
|
||||
__xmlParserVersion(void) {
|
||||
return &xmlParserVersion;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -90,7 +90,6 @@ xmlDllMain(void *hinstDLL, unsigned long fdwReason,
|
||||
#define XML_EMPTY
|
||||
|
||||
#define XML_GLOBALS_CORE \
|
||||
XML_OP(xmlParserVersion, const char *, XML_EMPTY) \
|
||||
/* error handling */ \
|
||||
XML_OP(xmlLastError, xmlError, XML_DEPRECATED) \
|
||||
XML_OP(xmlGenericError, xmlGenericErrorFunc, XML_EMPTY) \
|
||||
@ -197,7 +196,6 @@ XML_GLOBALS
|
||||
XML_GLOBAL_MACRO(xmlLineNumbersDefaultValue)
|
||||
#define xmlLoadExtDtdDefaultValue XML_GLOBAL_MACRO(xmlLoadExtDtdDefaultValue)
|
||||
#define xmlParserDebugEntities XML_GLOBAL_MACRO(xmlParserDebugEntities)
|
||||
#define xmlParserVersion XML_GLOBAL_MACRO(xmlParserVersion)
|
||||
#define xmlPedanticParserDefaultValue \
|
||||
XML_GLOBAL_MACRO(xmlPedanticParserDefaultValue)
|
||||
#define xmlSaveNoEmptyTags XML_GLOBAL_MACRO(xmlSaveNoEmptyTags)
|
||||
|
@ -805,6 +805,17 @@ typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL,
|
||||
const char *ID,
|
||||
xmlParserCtxtPtr context);
|
||||
|
||||
/*
|
||||
* Variables
|
||||
*/
|
||||
|
||||
XMLPUBVAR const char *const
|
||||
xmlParserVersion;
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
XMLPUBFUN const char *const *
|
||||
__xmlParserVersion(void);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
8
parser.c
8
parser.c
@ -145,6 +145,14 @@ unsigned int xmlParserMaxDepth = 256;
|
||||
*/
|
||||
#define XML_PARSER_CHUNK_SIZE 100
|
||||
|
||||
/**
|
||||
* xmlParserVersion:
|
||||
*
|
||||
* Constant string describing the internal version of the library
|
||||
*/
|
||||
const char *const
|
||||
xmlParserVersion = LIBXML_VERSION_STRING LIBXML_VERSION_EXTRA;
|
||||
|
||||
/*
|
||||
* List of XML prefixed PI allowed by W3C specs
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user