equal
deleted
inserted
replaced
56 } |
56 } |
57 } |
57 } |
58 |
58 |
59 #ifdef ASSERT |
59 #ifdef ASSERT |
60 xmlStream::~xmlStream() { |
60 xmlStream::~xmlStream() { |
61 FREE_C_HEAP_ARRAY(char, _element_close_stack_low, mtInternal); |
61 FREE_C_HEAP_ARRAY(char, _element_close_stack_low); |
62 } |
62 } |
63 #endif |
63 #endif |
64 |
64 |
65 // Pass the given chars directly to _out. |
65 // Pass the given chars directly to _out. |
66 void xmlStream::write(const char* s, size_t len) { |
66 void xmlStream::write(const char* s, size_t len) { |
160 char* new_ptr = new_high - old_len; |
160 char* new_ptr = new_high - old_len; |
161 memcpy(new_ptr, old_ptr, old_len); |
161 memcpy(new_ptr, old_ptr, old_len); |
162 _element_close_stack_high = new_high; |
162 _element_close_stack_high = new_high; |
163 _element_close_stack_low = new_low; |
163 _element_close_stack_low = new_low; |
164 _element_close_stack_ptr = new_ptr; |
164 _element_close_stack_ptr = new_ptr; |
165 FREE_C_HEAP_ARRAY(char, old_low, mtInternal); |
165 FREE_C_HEAP_ARRAY(char, old_low); |
166 push_ptr = new_ptr - (tag_len+1); |
166 push_ptr = new_ptr - (tag_len+1); |
167 } |
167 } |
168 assert(push_ptr >= _element_close_stack_low, "in range"); |
168 assert(push_ptr >= _element_close_stack_low, "in range"); |
169 memcpy(push_ptr, tag, tag_len); |
169 memcpy(push_ptr, tag, tag_len); |
170 push_ptr[tag_len] = 0; |
170 push_ptr[tag_len] = 0; |