]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Synced after simplifying the parser registration API.
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 17 Mar 2009 15:29:06 +0000 (09:29 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Tue, 17 Mar 2009 15:29:06 +0000 (09:29 -0600)
src/esi/CustomParser.cc
src/esi/CustomParser.h
src/esi/ExpatParser.cc
src/esi/ExpatParser.h
src/esi/Libxml2Parser.cc
src/esi/Libxml2Parser.h

index dfa988150df4d8ec27fba5260aff2998c40a9d78..d9bfba8f43ef8f6fd12d29197fbc9af34894e6d4 100644 (file)
@@ -41,7 +41,7 @@
 
 Trie *ESICustomParser::SearchTrie=NULL;
 
-RegisterESIParser("custom", ESICustomParser);
+EsiParserDefinition(ESICustomParser);
 
 Trie *
 ESICustomParser::GetTrie()
index 5f7ce8c13123564533d6f54a42e24a06ad91eb7e..7bc2b9a3f76e980bf85ce5bddc9fbe969f658345 100644 (file)
@@ -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 {
index 5755cbd11130bbc860775815b4b1869e44a34477..6bdb0fd9c182b65a415fc59753f8203fef192063 100644 (file)
@@ -39,7 +39,7 @@
 
 #include "esi/ExpatParser.h"
 
-RegisterESIParser("expat", ESIExpatParser);
+EsiParserDefinition(ESIExpatParser);
 
 ESIExpatParser::ESIExpatParser(ESIParserClient *aClient) : theClient (aClient)
 {
index 8463cb61733c31a39a865f3dc41296f43d9812a1..dfc5045a514190ce517a5be0206ed2791b17114e 100644 (file)
@@ -36,7 +36,7 @@
 #if USE_SQUID_ESI
 
 #include "esi/Parser.h"
-#include "expat.h"
+#include <expat.h>
 
 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);
index 23dced14ba70b963e6c5d90a620e49cf3955de6e..e0fc3562cc4740707d0a0d6134e713970fa43206 100644 (file)
@@ -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)
index 9b253b3bdf4b600cf57951e2b3fa9cbf42148595..c360930bb9589dcfdf1ef33200a789dcf3cce248 100644 (file)
@@ -70,8 +70,9 @@ public:
 
     ESIParserClient *getClient() { return theClient; }
 
+    EsiParserDeclaration;
+
 private:
-    ESI_PARSER_TYPE;
     mutable xmlParserCtxtPtr parser; /* our parser */
 
     ESIParserClient *theClient;