summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pugixml.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp
index ebafd48..e150d17 100644
--- a/src/pugixml.cpp
+++ b/src/pugixml.cpp
@@ -238,7 +238,7 @@ namespace pugi
xml_allocator& alloc;
bool chartype_symbol_table[256];
- bool chartype_symbol(char c) { return chartype_symbol_table[(unsigned char)c]; }
+ bool chartype_symbol(char c) const { return chartype_symbol_table[(unsigned char)c]; }
static bool chartype_space(char c) { return c < '!' && c > 0; }
static bool chartype_enter(char c) { return c == '<'; }
@@ -995,11 +995,6 @@ namespace pugi
return find;
}
- namespace impl
- {
- int strcmpwild(const char* src, const char* dst);
- }
-
// Wildcard pattern match.
static int strcmpwild_astr(const char** src, const char** dst)
{
@@ -1934,6 +1929,9 @@ namespace pugi
char* xml_parser::parse(char* xmlstr,unsigned int optmsk)
{
+ if (xmlstr == _buffer)
+ _buffer = 0;
+
free();
if(!xmlstr) return 0;
@@ -1951,6 +1949,9 @@ namespace pugi
char* xml_parser::parse(const transfer_ownership_tag&, char* xmlstr,unsigned int optmsk)
{
+ if (xmlstr == _buffer)
+ _buffer = 0;
+
free();
if(!xmlstr) return 0;