Skip to content
Snippets Groups Projects
  1. Jun 19, 2016
  2. Jun 14, 2016
  3. Jun 06, 2016
  4. May 25, 2016
  5. May 05, 2016
  6. Mar 10, 2016
  7. Mar 07, 2016
  8. Mar 04, 2016
  9. Feb 20, 2016
  10. Feb 19, 2016
  11. Feb 13, 2016
  12. Feb 07, 2016
  13. Feb 06, 2016
  14. Jan 27, 2016
  15. Jan 26, 2016
    • Petteri Aimonen's avatar
      Get rid of type punning in pb_encode_fixedXX(). · d79b15d8
      Petteri Aimonen authored
      This was never very clean code, but it was fast. Hopefully
      compilers are smart enough to optimize it away, or the speed
      difference is not very large. This should be checked.
      
      However working code is always more important than fast code,
      and the previous way couldn't really work for platforms that
      do not have byte-sized memory access. Related to PR #191.
      d79b15d8
  16. Dec 16, 2015
    • Petteri Aimonen's avatar
      Merge pull request #190 from aeruder/master · cad502a1
      Petteri Aimonen authored
      pb_istream_from_buffer: add const to prototype
      cad502a1
    • Andrew Ruder's avatar
      pb_istream_from_buffer: add const to prototype · 3d361579
      Andrew Ruder authored
      This commit changes the prototype for pb_istream_from_buffer from:
        pb_istream_t pb_istream_from_buffer(uint8_t *buf, size_t bufsize);
      to
        pb_istream_t pb_istream_from_buffer(const uint8_t *buf, size_t bufsize);
      
      This allows pb_istream_from_buffer users to point to const buffers
      without having to inspect code (to ensure practical const-ness) and then be
      forced to manually cast away const.
      
      In order to not break compatibility with existing programs (by
      introducing a const/non-const union in the pb_istream_t state) we simply
      cast away the const in pb_istream_from_buffer and re-apply it when
      possible in the callbacks.  Unfortunately we lose any compiler help in
      the callbacks to ensure we are treating the buffer as const but manual
      inspection is easy enough.
      3d361579
  17. Nov 21, 2015
  18. Nov 20, 2015
  19. Nov 15, 2015
  20. Nov 14, 2015
  21. Nov 11, 2015
  22. Oct 25, 2015
Loading