Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
Move pugixml project file for VS2015 to scripts/ and unify the output file
structure similar to old VS201x projects. Remove test projects and solution
since they are not required for building.
Provide more accurate information in the package script and handle build
errors during package construction properly.
|
|
|
|
|
|
Instead of functions with different names (e.g. decode_utf8_block), split
utf_decoder class into multiple classes with ::process static function.
This makes it easier to share code for decoding different encodings.
|
|
|
|
This does not affect correctness but makes code more uniform.
|
|
Make sure the looping structure is the same as in decode_utf8_block.
|
|
Instead of calling xml_document public functions just call implementation of
load_buffer_inplace_own. This makes it so we only call reset() once during
load_file/load.
|
|
|
|
|
|
|
|
This makes sure we get linking errors whenever a symbol is not marked as inline
in header-only mode.
|
|
Fixed missing PUGI__FN
|
|
|
|
We now make sure that in CMake builds we have long long support. This requires
CMake 3.1 for target_compile_features.
Fixes #53 (as long as packages use this CMake script... most of them do)
|
|
This matches the format strtol supports.
|
|
Add OSX to Travis CI config
|
|
We don't need to test gcc on OSX
|
|
|
|
|
|
These tests are only testing attribute as_int in hopes that xml_text uses the
same underlying implementation (which it does).
|
|
This makes conversion significantly faster and removes more CRT dependencies;
in particular, to support long long pugixml only requires the type itself (and
the division operator...).
New implementation is up to 3x faster on short decimal numbers.
Note that unlike the old implementation, new implementation correctly handles
overflow and underflow and clamps the value to the representable range. This
means that there are some behavior changes - e.g. previously as_uint on "-1"
would return INT_MAX instead of 0.
In addition to CRT issues, for platforms with 64-bit long old implementation
incorrectly truncated from long to int or unsigned int, so even if CRT clamped
the values the result would have been incorrect.
|
|
This does not really matter too much but it's better to be consistent.
|
|
Also since this function is only used once and is not defined in regular mode
to avoid warnings this simplifies code a bit.
|
|
Since we use manual integer conversion we know the length of the string.
This makes set_value(int) ~30% faster for 4-digit numbers.
|
|
This makes it possible to avoid calling strlen if we already know the string
size.
|
|
This reduces the amount of non-standard C++ functionality pugixml may be using
by avoiding sprintf with %lld; additionally this implementation is significantly
faster (4-5x) than sprintf, mostly due to avoiding format string parsing and
stream setup that commonly happens in CRT implementations.
This comes at the expense of requiring long long division/remainder operations
if PUGIXML_USE_LONG_LONG is defined which will surely bite me one day.
|
|
They were still using Windows EOL by mistake
|
|
|
|
Also upload just pugixml.cpp.gcov to codecov to avoid issues the script has
with old gcov.
|
|
Use find -exec instead of xargs to work around differences between xargs on OSX
and Linux.
Use -b option of gcov - for some reason gcov on Travis can't find .gcno files
otherwise (old version?).
And finally enable config=coverage again.
|
|
|
|
|
|
|
|
Use -coverage option and keep NDEBUG off
|
|
|
|
Also add PUGIXML_COMPACT to pugiconfig.hpp
|
|
Remove an extra branch.
|
|
Change the expression to reference the array element indirectly. The memory
block can be bigger than the structure so it's invalid to use static data[]
size for bounds checking.
|
|
To be more precise, the memory block is now aligned to be able to reliably
allocate objects with both double and pointer fields. If there is a platform
with a 4-byte double and a 4-byte pointer, the memory block alignment there will
stay the same after this change.
Fixes #48.
|
|
Previously test allocator only guaranteed alignment enough for a pointer.
On some platforms (e.g. SPARC) double has to be aligned to 8 bytes but pointers
can have a size of 4 bytes. This commit increases allocation header to fix that.
In practical terms the allocation header is now always 8 bytes.
|
|
Extract memory page size and block alignment into named constants.
|
|
This fixes tests in PUGIXML_NO_XPATH mode on SPARC64 (#48).
SPARC does not allow unaligned accesses - e.g. you can't read an unaligned int.
Normally pugixml does not perform unaligned integer/pointer accesses, but page
heap can allocate blocks that are not aligned so that we can detect a single-
byte read/write overrun.
Additionally, the hardcoded page size we're currently using is really system
specific - on SPARC the page size can be 8 Kb instead of 4 Kb so mprotect can
fail.
|
|
This makes the code slightly more readable, but more importantly it fixes a
false positive in Clang static analyzer.
Fixes #47.
|
|
Fixes #43.
|
|
All other sanitizers are still unavailable so only enable them on non-OSX
systems.
|