1
0
mirror of https://github.com/OlafvdSpek/ctemplate.git synced 2025-09-28 19:05:49 +08:00

Remove HTMLPARSER_NAMESPACE

This commit is contained in:
olafvdspek 2015-02-15 13:47:56 +00:00
parent 6eadf59686
commit 7297fd52cb
13 changed files with 18 additions and 18 deletions

View File

@ -179,7 +179,7 @@ AC_SUBST(ac_windows_dllexport)
# This will (should) never change, but we put it here so if we do need
# to change it, to avoid naming conflicts or something, it's easy to
# do in one place.
ac_htmlparser_namespace=google_ctemplate_streamhtmlparser
ac_htmlparser_namespace=ctemplate_htmlparser
AC_SUBST(ac_htmlparser_namespace)
AC_DEFINE_UNQUOTED(HTMLPARSER_NAMESPACE, $ac_htmlparser_namespace,
[The namespace to put the htmlparser code.])

View File

@ -57,7 +57,7 @@ class PerExpandData;
}
#endif
namespace @ac_htmlparser_namespace@ {
namespace ctemplate_htmlparser {
class HtmlParser;
}
@ -431,7 +431,7 @@ class @ac_windows_dllexport@ Template {
TemplateContext initial_context_;
// Non-null if the template was initialized in an Auto-Escape mode that
// requires a parser (currently TC_HTML, TC_CSS and TC_JS).
@ac_htmlparser_namespace@::HtmlParser *htmlparser_;
ctemplate_htmlparser::HtmlParser *htmlparser_;
// A sorted list of trusted variable names, declared here because a unittest
// needs to verify that it is appropriately sorted (an unsorted array would

View File

@ -55,7 +55,7 @@
#endif
#ifdef __cplusplus
namespace HTMLPARSER_NAMESPACE {
namespace ctemplate_htmlparser {
#endif
/* Generated state machine definition. */

View File

@ -50,7 +50,7 @@
#endif
#ifdef __cplusplus
namespace HTMLPARSER_NAMESPACE {
namespace ctemplate_htmlparser {
#endif
/* entity filter */

View File

@ -40,7 +40,7 @@
#include "htmlparser/jsparser.h"
#include "base/util.h"
namespace HTMLPARSER_NAMESPACE {
namespace ctemplate_htmlparser {
class JavascriptParser {
public:

View File

@ -49,7 +49,7 @@
#endif
#ifdef __cplusplus
namespace HTMLPARSER_NAMESPACE {
namespace ctemplate_htmlparser {
#endif /* __cplusplus */
/* Generated state machine definition. */

View File

@ -38,7 +38,7 @@
#include "htmlparser/statemachine.h"
#ifdef __cplusplus
namespace HTMLPARSER_NAMESPACE {
namespace ctemplate_htmlparser {
#endif /* __cplusplus */
/* Size of the ring buffer used to lookup the last token in the javascript

View File

@ -48,7 +48,7 @@
#endif
#ifdef __cplusplus
namespace HTMLPARSER_NAMESPACE {
namespace ctemplate_htmlparser {
#endif
#define MAX_CHAR_8BIT 256

View File

@ -36,7 +36,7 @@
#include <config.h>
#ifdef __cplusplus
namespace HTMLPARSER_NAMESPACE {
namespace ctemplate_htmlparser {
#endif
/* TODO(falmeida): I'm not sure about these limits, but since right now we only

View File

@ -116,7 +116,7 @@ using HASH_NAMESPACE::hash_map;
namespace ctemplate {
using HTMLPARSER_NAMESPACE::HtmlParser;
using ctemplate_htmlparser::HtmlParser;
TemplateId GlobalIdForSTS_INIT(const TemplateString& s) {
return s.GetGlobalId(); // normally this method is private

View File

@ -84,7 +84,7 @@ bool HasInsecureProtocol(const char* in, int inlen) {
namespace ctemplate {
using HTMLPARSER_NAMESPACE::HtmlParser;
using ctemplate_htmlparser::HtmlParser;
// A most-efficient way to append a string literal to the var named 'out'.
// The ""s ensure literal is actually a string literal

View File

@ -65,7 +65,7 @@
using std::string;
using std::vector;
namespace HTMLPARSER_NAMESPACE {
namespace ctemplate_htmlparser {
class HtmlParser;
}
@ -181,7 +181,7 @@ string PrettyPrintOneModifier(const ModifierAndValue& modval);
// to change.
extern CTEMPLATE_DLL_DECL
vector<const ModifierAndValue*> GetModifierForHtmlJs(
HTMLPARSER_NAMESPACE::HtmlParser* htmlparser, string* error_msg);
ctemplate_htmlparser::HtmlParser* htmlparser, string* error_msg);
// Returns the appropriate escaping directives to escape content
// in a CSS context.
@ -191,7 +191,7 @@ vector<const ModifierAndValue*> GetModifierForHtmlJs(
// that take URLs, which require a different escaping function (non-existent).
extern CTEMPLATE_DLL_DECL
vector<const ModifierAndValue*> GetModifierForCss(
HTMLPARSER_NAMESPACE::HtmlParser* htmlparser, string* error_msg);
ctemplate_htmlparser::HtmlParser* htmlparser, string* error_msg);
// Returns the appropriate escaping directives to escape content
// in an XML context.
@ -199,7 +199,7 @@ vector<const ModifierAndValue*> GetModifierForCss(
// parser nor can it fail. This may change once the parser can parse XML.
extern CTEMPLATE_DLL_DECL
vector<const ModifierAndValue*> GetModifierForXml(
HTMLPARSER_NAMESPACE::HtmlParser* htmlparser, string* error_msg);
ctemplate_htmlparser::HtmlParser* htmlparser, string* error_msg);
// Returns the appropriate escaping directives to escape content
// in a JSON context.
@ -208,7 +208,7 @@ vector<const ModifierAndValue*> GetModifierForXml(
// and distinguish different contexts within JSON.
extern CTEMPLATE_DLL_DECL
vector<const ModifierAndValue*> GetModifierForJson(
HTMLPARSER_NAMESPACE::HtmlParser* htmlparser, string* error_msg);
ctemplate_htmlparser::HtmlParser* htmlparser, string* error_msg);
// Return the default escaping directives to escape content for the given
// context. These methods are useful when the caller does not have

View File

@ -88,7 +88,7 @@ using std::string;
using std::vector;
using GOOGLE_NAMESPACE::PathJoin;
namespace HTMLPARSER_NAMESPACE {
namespace ctemplate_htmlparser {
// Maximum file size limit.
static const int kMaxFileSize = 1000000;