1. 02 Jul, 2020 1 commit
  2. 01 Jul, 2020 1 commit
    • Simon McVittie's avatar
      build: Add a symbol version to all exported symbols · ef7fb78a
      Simon McVittie authored
      The --default-symver linker option attaches a default version definition
      (the SONAME) to every exported symbol. It is supported since at least
      GNU binutils 2.22 in 2011 (older versions not tested).
      
      With this version definition, newly-linked binaries that depend on the
      json-glib shared library will refer to its symbols in a versioned form,
      preventing their references from being resolved to a symbol of the same
      name exported by json-c or libjansson if those libraries appear in
      dependency search order before json-glib, which will usually result in
      a crash. This is necessary because ELF symbol resolution normally uses
      a single flat namespace, not a tree like Windows symbol resolution.
      At least one symbol (json_object_iter_next()) is exported by all three
      JSON libraries.
      
      Linking with -Bsymbolic is not enough to have this effect in all cases,
      because -Bsymbolic only affects symbol lookup within a shared object,
      for example when json_from_string() calls json_parser_new(). It does
      not affect symbol lookup when external code calls into json-glib,
      for example when libedataserver calls json_parser_new().
      
      This change will also not prevent code that depends on json-c or
      libjansson from finding json-glib's symbols and crashing; to prevent
      that, a corresponding change in json-c or libjansson would be needed.
      
      Adding a symbol-version is a backwards-compatible change, but once
      added, removing or changing the symbol-version would be an incompatible
      change that requires a SONAME bump.
      
      Partially resolves #33
      and glib#2147.
      Signed-off-by: Simon McVittie's avatarSimon McVittie <smcv@collabora.com>
      ef7fb78a
  3. 16 Jun, 2020 1 commit
  4. 09 Jun, 2020 2 commits
    • Philip Withnall's avatar
      json-parser: Support loading files via memory mapping · dd7a7112
      Philip Withnall authored
      Add a new `json_parser_load_from_mapped_file()` to load JSON from
      files via memory mapping. It’s otherwise similar to
      `json_parser_load_from_file()`. It’s in the right position to be able
      to memory map the file it’s reading from: it reads the input once
      before building a `JsonNode` structure to represent it, doesn’t write
      to the file, and often deals with large input files.
      
      This should speed things up slightly due to reducing time spent
      allocating a large chunk of heap memory to load the file into, if a
      caller can support that.
      Signed-off-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
      dd7a7112
    • Philip Withnall's avatar
      tests: Factor out a helper function · 13142637
      Philip Withnall authored
      This introduces no functional changes, but will allow that code to be
      reused in the following commit.
      Signed-off-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
      13142637
  5. 08 Apr, 2020 2 commits
  6. 06 Apr, 2020 4 commits
  7. 16 Mar, 2020 1 commit
  8. 28 Jan, 2020 2 commits
  9. 14 Jan, 2020 1 commit
  10. 13 Jan, 2020 2 commits
  11. 10 Jan, 2020 2 commits
  12. 09 Jan, 2020 1 commit
  13. 08 Jan, 2020 1 commit
  14. 07 Jan, 2020 2 commits
  15. 15 Nov, 2019 1 commit
  16. 14 Nov, 2019 1 commit
  17. 30 Aug, 2019 1 commit
  18. 28 Feb, 2019 1 commit
  19. 24 Feb, 2019 1 commit
  20. 23 Jan, 2019 1 commit
  21. 07 Jan, 2019 6 commits
  22. 29 Dec, 2018 1 commit
  23. 15 Dec, 2018 1 commit
  24. 17 Nov, 2018 1 commit
  25. 29 Sep, 2018 1 commit
  26. 01 Sep, 2018 1 commit