Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tinycbor mynewt upstream #83

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Feb 6, 2018

  1. Bring tinycbor up to date with mynewt tinycbor

    - Bring tinycbor up to date with mynewt tinycbor
    - Changing implementation of cbor_encoder_get_extra_bytes_needed()
      and cbor_encoder_get_buffer_size() as part of cbor_buf_writer APIs
    - Move bytes_needed field from CborEncoder to the buf writer, this
      is needed by the tests mainly.
    - Fix cbor_buf_cmp to do memcmp and return complemented result
    - iterate_string_chunks(): fixing NULL compare at the end of string
      and moving it out of the iterate_string_chunks(). This is to avoid
      buffer specific parser calls in the function
    - cbor_value_get_next_byte() is removed in mynewt version of tinycbor,
      so, we track offsets of the buffer which can be used for comparison
      in the parser tests instead of calculating the offset
    - Move cbor_encoder_get_extra_bytes_needed() and
      cbor_encoder_get_buffer_size() to be part of cbor_buf_writer APIs
    - Add bytes_needed field to the buf writer
    - Adding encoder writer and parser reader as part of the encoder and
      parser structure. This is to make the encoder and parser use new
      function of encoder_writer and decoder_reader without breaking backwards
      compatibility.
    - Making the old API use flat buffers by default
    - Adding APIs for initializing encoder and parser with custom writer and
      reader
    - Make the default writer and reader conditional based on
      NO_DFLT_READER/WRITER define. This is because we want a default
      reader/writer to avoid API changes.
    - Move enums to cbor_defs.h
    - Use it->offset instead of it->ptr to track buffer offsets
    - Update resolve_indicator() static api paramaters to use cbor value
      and access offsets instead of taking pointers as input parameters
    - In validate_container() do a byte by byte comparison instead of
      memcmp since we no longer have access to teh buffer directly
      Also, use offets instead of pointers to validate sorted maps
    - Added a new dfine for conditionally compiling in float support (NO_FLOAT_SUPPORT).
      This is because we want the float support to be compiled in by
      default.
    - Use static_assert macro instead of Static_assert. Changed to avoid
      build failures.
    - Add api to get string chunk, this is a callback which can be used by
      buffer implementations to grab a string that is divided in chunks
      which spans across multiple chained buffers
    vrahane committed Feb 6, 2018
    Configuration menu
    Copy the full SHA
    ece8b46 View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2018

  1. half/full-FP support changes

    - Make half float encode/decode conditional
    - Change defaults for CBOR_WITHOUT_OPEN_MEMSTREAM,
      CBOR_NO_HALF_FLOAT_TYPE and CBOR_NO_FLOATING_POINT
      to y so that half float, float and open
      memstream support along with newlib libc does not
      get compiled in
    - src/cborpretty.c, src/cbortojson.c and src/cborvalidation.c
      conditionally include math.h and half float type support
    - Conditionally include math.h in src/compilersupport_p.h to avoid
      newlib libc from getting compiled in
    - Conditionally compile src/cborparser_dup_string.c if newlib libc is
      compiled in
    
    Signed-off-by: Vipul Rahane <[email protected]>
    vrahane committed Feb 8, 2018
    Configuration menu
    Copy the full SHA
    c45469b View commit details
    Browse the repository at this point in the history