Age | Commit message (Collapse) | Author |
|
|
|
|
|
Also test ranged for and copying big xpath_variable_set objects (to make
sure we actually handle hash collisions properly)
|
|
xpath_variable_set is essentially an associative container; it's about time it
became copyable.
Implementation is slightly tricky due to out of memory handling. Both copy ctor
and assignment operator have strong exception guarantee (even if exceptions are
disabled! which translates to "roll back on allocation errors").
|
|
Previously there was no guarantee that the tests that check for out of memory
handling behavior are actually correct - e.g. that they correctly simulate out
of memory conditions.
Now every simulated out of memory condition has to be "guarded" using
CHECK_ALLOC_FAIL. It makes sure that every piece of code that is supposed to
cause out-of-memory does so, and that no other code runs out of memory
unnoticed.
|
|
When parsing XPath variables, we need to perform a heap allocation; if it
fails, an xpath_exception instead of bad_alloc used to be thrown.
Now we throw the exception of a correct type so that xpath_exception means
'parsing error'.
|
|
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1077 99668b35-9821-0410-8761-19e4c4f06640
|
|
Also fix MSVC6 compilation (make convertions to function pointers explicit).
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1076 99668b35-9821-0410-8761-19e4c4f06640
|
|
More tests for out-of-memory and other edge conditions
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1075 99668b35-9821-0410-8761-19e4c4f06640
|
|
select_node is shorter and mistyping nodes as node or vice versa should
not lead to any issues since return types are substantially different.
select_single_node method still works and will be deprecated with an
attribute and removed at some point.
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1065 99668b35-9821-0410-8761-19e4c4f06640
|
|
git-svn-id: http://pugixml.googlecode.com/svn/trunk@696 99668b35-9821-0410-8761-19e4c4f06640
|
|
git-svn-id: http://pugixml.googlecode.com/svn/trunk@692 99668b35-9821-0410-8761-19e4c4f06640
|
|
git-svn-id: http://pugixml.googlecode.com/svn/trunk@683 99668b35-9821-0410-8761-19e4c4f06640
|
|
git-svn-id: http://pugixml.googlecode.com/svn/trunk@681 99668b35-9821-0410-8761-19e4c4f06640
|
|
git-svn-id: http://pugixml.googlecode.com/svn/trunk@679 99668b35-9821-0410-8761-19e4c4f06640
|