Skip to content
Snippets Groups Projects
  1. Apr 09, 2018
    • Eli Schwartz's avatar
      cmake: always install the pkg-config file (#193) · daeb8013
      Eli Schwartz authored
      There's really never a reason to *not* want this installed. If an option
      is needed to specify installing in a versioned subdirectory, this option
      should be explicitly described rather than hidden in something else.
      
      As an added bonus, this makes the CMake install code slightly *less*
      complicated.
      daeb8013
  2. Apr 04, 2018
  3. Apr 03, 2018
  4. Mar 29, 2018
  5. Mar 17, 2018
    • Arseny Kapoulkine's avatar
      docs: Update changelog · cec32da2
      Arseny Kapoulkine authored
      Mention ubsan fixes; these fixes probably fix compact mode on some
      64-bit architecture where unaligned pointer reads aren't valid as well
      but it's probably not very relevant...
      cec32da2
    • Arseny Kapoulkine's avatar
      tests: Fix PUGIXML_COMPACT+PUGIXML_WCHAR_MODE tests · fe7b8378
      Arseny Kapoulkine authored
      Several tests got the buffer size wrong when sizeof(char_t)>1, and one
      test didn't meet the carefully tuned allocation criteria under compact
      mode due to the hash table usage and had to be changed a bit.
      fe7b8378
    • Arseny Kapoulkine's avatar
      ubsan: Fix undefined behavior for signed left shift in compact mode · e50672cf
      Arseny Kapoulkine authored
      We were using << compact_alignment_log2 instead of * compact_alignment
      for symmetry with the encoding where >> is crucial to keep code fast and
      round to negative infinity.
      
      For decoding, the results are the same and any reasonable compiler
      should convert *4 into <<2 so just use a multiplication - that doesn't
      trigger UB on negative numbers.
      e50672cf
  6. Mar 16, 2018
  7. Mar 13, 2018
  8. Mar 03, 2018
  9. Mar 02, 2018
  10. Feb 27, 2018
  11. Feb 22, 2018
    • Arseny Kapoulkine's avatar
      Work around gcc issues with limits.h not defining LLONG_MIN · 2ec3579f
      Arseny Kapoulkine authored
      It looks like there are several cases where this might happen:
      
      - In some MinGW distributions, the LLONG_MIN/etc defines are guarded
      with:
      
      	#if !defined(__STRICT_ANSI__) && defined(__GNUC__)
      
      Which means that you don't get them in strict ANSI mode. The previous
      workaround was specifically targeted towards this.
      
      - In some GCC distributions (notably GCC 6.3.0 in some configurations),
      LLONG_MIN/etc. defines are guarded with:
      
      	#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
      
      But __STDC_VERSION__ isn't defined as C99 even if you use -std=c++14 -
      which is probably technically valid, but not useful.
      
      To work around this, redefine the symbols whenever we are building with
      GCC and we need them and they aren't defined - doing this is better than
      not building. Instead of hard-coding the constants, use GCC-specific
      __LONG_LONG_MAX__ to compute them.
      
      Fixes #181.
      2ec3579f
  12. Jan 29, 2018
  13. Jan 23, 2018
  14. Jan 08, 2018
  15. Dec 30, 2017
  16. Dec 22, 2017
  17. Nov 14, 2017
  18. Nov 13, 2017
    • Arseny Kapoulkine's avatar
      Merge pull request #170 from zeux/move · 7c6d0010
      Arseny Kapoulkine authored
      This change implements move ctor and assign support for xml_document.
      
      All node handles remain valid after the move and point to the new document; the only exception is the document node itself (that remains unmoved).
      
      Move is O(document size) in theory because it needs to relocate immediate document children (there is just one in conformant documents) and all memory pages; in practice the memory pages only need the header adjusted, which is ~0.1% of the actual data size.
      
      Move requires no allocations in general, except when using compact mode where some moves need to grow the hash table which can fail (throw).
      
      Fixes #104
    • Arseny Kapoulkine's avatar
      Fix -Wshadow warning · 3860b507
      Arseny Kapoulkine authored
      3860b507
    • Arseny Kapoulkine's avatar
      tests: Add compact move tests · 58611c87
      Arseny Kapoulkine authored
      This helps make sure our error handling logic works and is exercised.
      58611c87
Loading