From: Alex Rousskov Date: Tue, 17 Mar 2009 15:29:06 +0000 (-0600) Subject: Synced after simplifying the parser registration API. X-Git-Tag: SQUID_3_2_0_1~1111^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=019db3c6f10df4a4d5dcedb6bea2d6e9c7a498bc;p=thirdparty%2Fsquid.git Synced after simplifying the parser registration API. --- diff --git a/src/esi/CustomParser.cc b/src/esi/CustomParser.cc index dfa988150d..d9bfba8f43 100644 --- a/src/esi/CustomParser.cc +++ b/src/esi/CustomParser.cc @@ -41,7 +41,7 @@ Trie *ESICustomParser::SearchTrie=NULL; -RegisterESIParser("custom", ESICustomParser); +EsiParserDefinition(ESICustomParser); Trie * ESICustomParser::GetTrie() diff --git a/src/esi/CustomParser.h b/src/esi/CustomParser.h index 5f7ce8c131..7bc2b9a3f7 100644 --- a/src/esi/CustomParser.h +++ b/src/esi/CustomParser.h @@ -54,8 +54,9 @@ public: long int lineNumber() const; char const * errorString() const; + EsiParserDeclaration; + private: - ESI_PARSER_TYPE; static Trie *SearchTrie; static Trie *GetTrie(); enum ESITAG_t { diff --git a/src/esi/ExpatParser.cc b/src/esi/ExpatParser.cc index 5755cbd111..6bdb0fd9c1 100644 --- a/src/esi/ExpatParser.cc +++ b/src/esi/ExpatParser.cc @@ -39,7 +39,7 @@ #include "esi/ExpatParser.h" -RegisterESIParser("expat", ESIExpatParser); +EsiParserDefinition(ESIExpatParser); ESIExpatParser::ESIExpatParser(ESIParserClient *aClient) : theClient (aClient) { diff --git a/src/esi/ExpatParser.h b/src/esi/ExpatParser.h index 8463cb6173..dfc5045a51 100644 --- a/src/esi/ExpatParser.h +++ b/src/esi/ExpatParser.h @@ -36,7 +36,7 @@ #if USE_SQUID_ESI #include "esi/Parser.h" -#include "expat.h" +#include class ESIExpatParser : public ESIParser { @@ -51,8 +51,9 @@ public: long int lineNumber() const; char const * errorString() const; + EsiParserDeclaration; + private: - ESI_PARSER_TYPE; /** our parser */ mutable XML_Parser p; static void Start(void *data, const XML_Char *el, const char **attr); diff --git a/src/esi/Libxml2Parser.cc b/src/esi/Libxml2Parser.cc index 23dced14ba..e0fc3562cc 100644 --- a/src/esi/Libxml2Parser.cc +++ b/src/esi/Libxml2Parser.cc @@ -47,7 +47,7 @@ // definitions static htmlDocPtr entity_doc = NULL; -RegisterESIParser("libxml2", ESILibxml2Parser); +EsiParserDefinition(ESILibxml2Parser); // the SAX callback functions void esi_startElementSAXFunc(void * ctx, const xmlChar * name, const xmlChar ** atts) diff --git a/src/esi/Libxml2Parser.h b/src/esi/Libxml2Parser.h index 9b253b3bdf..c360930bb9 100644 --- a/src/esi/Libxml2Parser.h +++ b/src/esi/Libxml2Parser.h @@ -70,8 +70,9 @@ public: ESIParserClient *getClient() { return theClient; } + EsiParserDeclaration; + private: - ESI_PARSER_TYPE; mutable xmlParserCtxtPtr parser; /* our parser */ ESIParserClient *theClient;