mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-24 13:33:01 +03:00
globals: Remove unused globals from thread storage
Setting these deprecated globals hasn't had an effect for a long time. Make them constants. This reduces the size of per-thread storage from ~700 to ~250 bytes.
This commit is contained in:
@@ -80,22 +80,17 @@ struct _htmlEntityDesc {
|
||||
const char *desc; /* the description */
|
||||
};
|
||||
|
||||
/** DOC_DISABLE */
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
#define XML_GLOBALS_HTML \
|
||||
XML_OP(htmlDefaultSAXHandler, xmlSAXHandlerV1, XML_DEPRECATED)
|
||||
#else
|
||||
#define XML_GLOBALS_HTML
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBVAR const xmlSAXHandlerV1 htmlDefaultSAXHandler;
|
||||
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN const xmlSAXHandlerV1 *__htmlDefaultSAXHandler(void);
|
||||
#endif
|
||||
|
||||
#define XML_OP XML_DECLARE_GLOBAL
|
||||
XML_GLOBALS_HTML
|
||||
#undef XML_OP
|
||||
|
||||
#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
|
||||
#define htmlDefaultSAXHandler XML_GLOBAL_MACRO(htmlDefaultSAXHandler)
|
||||
#endif
|
||||
/** DOC_ENABLE */
|
||||
#endif /* LIBXML_SAX1_ENABLED */
|
||||
|
||||
/*
|
||||
* There is only few public functions.
|
||||
@@ -333,11 +328,5 @@ XMLPUBFUN htmlStatus htmlNodeStatus(htmlNodePtr, int) ;
|
||||
}
|
||||
#endif
|
||||
|
||||
#else /* LIBXML_HTML_ENABLED */
|
||||
|
||||
/** DOC_DISABLE */
|
||||
#define XML_GLOBALS_HTML
|
||||
/** DOC_ENABLE */
|
||||
|
||||
#endif /* LIBXML_HTML_ENABLED */
|
||||
#endif /* __HTML_PARSER_H__ */
|
||||
|
||||
Reference in New Issue
Block a user