- Jan 08, 2016
-
-
Arseny Kapoulkine authored
-
Arseny Kapoulkine authored
When this flag is true, PCDATA value is saved to the parent element instead of allocating a new node. This prevents some documents from round-tripping since it loses information, but can provide a significant memory reduction and parsing speedup for some documents.
-
- Dec 31, 2015
-
-
Arseny Kapoulkine authored
-
- Dec 29, 2015
-
-
Arseny Kapoulkine authored
(!"string") triggers the warning however (false && "string") does not. Fixes #75.
-
- Nov 13, 2015
-
-
Arseny Kapoulkine authored
Apparently some MinGW distributions have a compiler that's recent enough to support C++11 but limits.h header that incorrectly omits LLONG limits in strict ANSI mode, since it guards the definitions with: #if !defined(__STRICT_ANSI__) && defined(__GNUC__) We can just define these symbols ourselves in this specific case. Fixes #66.
-
- Oct 25, 2015
-
-
Arseny Kapoulkine authored
It does not have stdint.h and has some C++ parsing issues.
-
- Oct 19, 2015
-
-
Arseny Kapoulkine authored
-
- Oct 18, 2015
-
-
Arseny Kapoulkine authored
-
Arseny Kapoulkine authored
-
Arseny Kapoulkine authored
For some reason reference to a fixed-size array works in two other places but not in this one...
-
Arseny Kapoulkine authored
These show up when building with Wcast-align for ARM.
-
- Oct 17, 2015
-
-
Arseny Kapoulkine authored
It now also moves parse result.
-
Arseny Kapoulkine authored
Only happens on GCC 3.4 for some reason.
-
Arseny Kapoulkine authored
-
Arseny Kapoulkine authored
name_sentry dtor results in multiple symbol definition errors in MSVC6.
-
Arseny Kapoulkine authored
Since they don't contribute to the resulting value just skip them before parsing. This matches the behavior of strtol/strtoll and results in more intuitive behavior.
-
Arseny Kapoulkine authored
Node type enum is not used as an array index anywhere else; the code is not very readable and the value of this "optimization" is questionable. The conditions are arranged so that in all normal cases the first comparison returns true anyway.
-
Arseny Kapoulkine authored
The minneg argument is supposed to be the absolute value of the minimum negative representable number. In case of two-complement arithmetic, it's the same as the value itself but it's better to be explicit and negate the argument.
-
Arseny Kapoulkine authored
-
- Oct 12, 2015
-
-
Arseny Kapoulkine authored
Share the implementation for different encodings. We still need two functions because endian_swap on uint8_t is ambiguous...
-
- Oct 10, 2015
-
-
Arseny Kapoulkine authored
-
Arseny Kapoulkine authored
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.
-
- Oct 08, 2015
-
-
Arseny Kapoulkine authored
This does not affect correctness but makes code more uniform.
-
Arseny Kapoulkine authored
Make sure the looping structure is the same as in decode_utf8_block.
-
Arseny Kapoulkine authored
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.
-
- Oct 06, 2015
-
-
A. Breust authored
-
- Sep 21, 2015
-
-
Arseny Kapoulkine authored
This matches the format strtol supports.
-
- Sep 20, 2015
-
-
Arseny Kapoulkine authored
-
Arseny Kapoulkine authored
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.
-
Arseny Kapoulkine authored
This does not really matter too much but it's better to be consistent.
-
Arseny Kapoulkine authored
Also since this function is only used once and is not defined in regular mode to avoid warnings this simplifies code a bit.
-
Arseny Kapoulkine authored
Since we use manual integer conversion we know the length of the string. This makes set_value(int) ~30% faster for 4-digit numbers.
-
Arseny Kapoulkine authored
This makes it possible to avoid calling strlen if we already know the string size.
-
Arseny Kapoulkine authored
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.
-
- Aug 14, 2015
-
-
Arseny Kapoulkine authored
Also add PUGIXML_COMPACT to pugiconfig.hpp
-
Arseny Kapoulkine authored
Remove an extra branch.
-
- Jul 27, 2015
-
-
Arseny Kapoulkine authored
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.
-
- Jul 25, 2015
-
-
Arseny Kapoulkine authored
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.
-
Arseny Kapoulkine authored
Extract memory page size and block alignment into named constants.
-
- Jul 23, 2015
-
-
Arseny Kapoulkine authored
This makes the code slightly more readable, but more importantly it fixes a false positive in Clang static analyzer. Fixes #47.
-