summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2006-12-13 20:35:20 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2006-12-13 20:35:20 +0000
commit5203fa2e22da9efb8a241153601357808041da85 (patch)
tree955a780c5ce369e606b662a4295f1f56a2c302de /src
parent688bbe92903171db23921b4359871a642d8589ae (diff)
Fixed istream loading
git-svn-id: http://pugixml.googlecode.com/svn/trunk@22 99668b35-9821-0410-8761-19e4c4f06640
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;