diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2021-09-03 13:25:06 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2021-09-06 15:41:33 -0700 |
commit | 248828b9a3562fc23ac1d39733aaf07a83584dc4 (patch) | |
tree | 21fcc3dde4ae5a9e98d56af7d7fdc7aaeb2bcc39 /src/3rdparty | |
parent | dad1e1494128ff963b2a38870c44081f493f1e54 (diff) |
3rdparty: Update TinyCBOR to v0.6-rc1
Change-Id: Ie72b0dd0fbe84d2caae0fffd16a169a70845d33e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/tinycbor/qt_attribution.json | 6 | ||||
-rw-r--r-- | src/3rdparty/tinycbor/src/cbor.h | 10 | ||||
-rw-r--r-- | src/3rdparty/tinycbor/src/cborencoder.c | 28 | ||||
-rw-r--r-- | src/3rdparty/tinycbor/src/cborerrorstrings.c | 2 | ||||
-rw-r--r-- | src/3rdparty/tinycbor/src/cborinternal_p.h | 2 | ||||
-rw-r--r-- | src/3rdparty/tinycbor/src/cborparser.c | 4 | ||||
-rw-r--r-- | src/3rdparty/tinycbor/tests/.gitignore | 2 | ||||
-rw-r--r-- | src/3rdparty/tinycbor/tests/encoder/data.cpp | 2 | ||||
-rw-r--r-- | src/3rdparty/tinycbor/tests/encoder/tst_encoder.cpp | 2 | ||||
-rw-r--r-- | src/3rdparty/tinycbor/tests/parser/data.cpp | 2 | ||||
-rw-r--r-- | src/3rdparty/tinycbor/tests/parser/tst_parser.cpp | 2 |
11 files changed, 32 insertions, 30 deletions
diff --git a/src/3rdparty/tinycbor/qt_attribution.json b/src/3rdparty/tinycbor/qt_attribution.json index 3b9461f6d0..a3c4a58167 100644 --- a/src/3rdparty/tinycbor/qt_attribution.json +++ b/src/3rdparty/tinycbor/qt_attribution.json @@ -9,7 +9,7 @@ "License": "MIT License", "LicenseId": "MIT", "LicenseFile": "LICENSE", - "DownloadLocation": "https://github.com/thiagomacieira/tinycbor/archive/e6a4fa4862bcc3a6f6b07cf9d9b784d0ab6068b4.tar.gz", - "Version": "0.6+patches", - "Copyright": "Copyright (C) 2015-2019 Intel Corporation" + "DownloadLocation": "https://github.com/intel/tinycbor/archive/refs/tags/v0.6-rc1.tar.gz", + "Version": "0.6-rc1" + "Copyright": "Copyright (C) 2015-2021 Intel Corporation" } diff --git a/src/3rdparty/tinycbor/src/cbor.h b/src/3rdparty/tinycbor/src/cbor.h index dd2b4e4f71..be5bbc77a3 100644 --- a/src/3rdparty/tinycbor/src/cbor.h +++ b/src/3rdparty/tinycbor/src/cbor.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2019 Intel Corporation +** Copyright (C) 2021 Intel Corporation ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and associated documentation files (the "Software"), to deal @@ -263,10 +263,10 @@ CBOR_INLINE_API CborError cbor_encode_float(CborEncoder *encoder, float value) CBOR_INLINE_API CborError cbor_encode_double(CborEncoder *encoder, double value) { return cbor_encode_floating_point(encoder, CborDoubleType, &value); } -CBOR_API CborError cbor_encoder_create_array(CborEncoder *encoder, CborEncoder *arrayEncoder, size_t length); -CBOR_API CborError cbor_encoder_create_map(CborEncoder *encoder, CborEncoder *mapEncoder, size_t length); -CBOR_API CborError cbor_encoder_close_container(CborEncoder *encoder, const CborEncoder *containerEncoder); -CBOR_API CborError cbor_encoder_close_container_checked(CborEncoder *encoder, const CborEncoder *containerEncoder); +CBOR_API CborError cbor_encoder_create_array(CborEncoder *parentEncoder, CborEncoder *arrayEncoder, size_t length); +CBOR_API CborError cbor_encoder_create_map(CborEncoder *parentEncoder, CborEncoder *mapEncoder, size_t length); +CBOR_API CborError cbor_encoder_close_container(CborEncoder *parentEncoder, const CborEncoder *containerEncoder); +CBOR_API CborError cbor_encoder_close_container_checked(CborEncoder *parentEncoder, const CborEncoder *containerEncoder); CBOR_INLINE_API uint8_t *_cbor_encoder_get_buffer_pointer(const CborEncoder *encoder) { diff --git a/src/3rdparty/tinycbor/src/cborencoder.c b/src/3rdparty/tinycbor/src/cborencoder.c index 405b0a507d..a51f445159 100644 --- a/src/3rdparty/tinycbor/src/cborencoder.c +++ b/src/3rdparty/tinycbor/src/cborencoder.c @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2019 Intel Corporation +** Copyright (C) 2021 Intel Corporation ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and associated documentation files (the "Software"), to deal @@ -514,7 +514,7 @@ static CborError create_container(CborEncoder *encoder, CborEncoder *container, } /** - * Creates a CBOR array in the CBOR stream provided by \a encoder and + * Creates a CBOR array in the CBOR stream provided by \a parentEncoder and * initializes \a arrayEncoder so that items can be added to the array using * the CborEncoder functions. The array must be terminated by calling either * cbor_encoder_close_container() or cbor_encoder_close_container_checked() @@ -523,17 +523,17 @@ static CborError create_container(CborEncoder *encoder, CborEncoder *container, * The number of items inserted into the array must be exactly \a length items, * otherwise the stream is invalid. If the number of items is not known when * creating the array, the constant \ref CborIndefiniteLength may be passed as - * length instead. + * length instead, and an indefinite length array is created. * * \sa cbor_encoder_create_map */ -CborError cbor_encoder_create_array(CborEncoder *encoder, CborEncoder *arrayEncoder, size_t length) +CborError cbor_encoder_create_array(CborEncoder *parentEncoder, CborEncoder *arrayEncoder, size_t length) { - return create_container(encoder, arrayEncoder, length, ArrayType << MajorTypeShift); + return create_container(parentEncoder, arrayEncoder, length, ArrayType << MajorTypeShift); } /** - * Creates a CBOR map in the CBOR stream provided by \a encoder and + * Creates a CBOR map in the CBOR stream provided by \a parentEncoder and * initializes \a mapEncoder so that items can be added to the map using * the CborEncoder functions. The map must be terminated by calling either * cbor_encoder_close_container() or cbor_encoder_close_container_checked() @@ -542,7 +542,7 @@ CborError cbor_encoder_create_array(CborEncoder *encoder, CborEncoder *arrayEnco * The number of pair of items inserted into the map must be exactly \a length * items, otherwise the stream is invalid. If the number is not known * when creating the map, the constant \ref CborIndefiniteLength may be passed as - * length instead. + * length instead, and an indefinite length map is created. * * \b{Implementation limitation:} TinyCBOR cannot encode more than SIZE_MAX/2 * key-value pairs in the stream. If the length \a length is larger than this @@ -551,11 +551,11 @@ CborError cbor_encoder_create_array(CborEncoder *encoder, CborEncoder *arrayEnco * * \sa cbor_encoder_create_array */ -CborError cbor_encoder_create_map(CborEncoder *encoder, CborEncoder *mapEncoder, size_t length) +CborError cbor_encoder_create_map(CborEncoder *parentEncoder, CborEncoder *mapEncoder, size_t length) { if (length != CborIndefiniteLength && length > SIZE_MAX / 2) return CborErrorDataTooLarge; - return create_container(encoder, mapEncoder, length, MapType << MajorTypeShift); + return create_container(parentEncoder, mapEncoder, length, MapType << MajorTypeShift); } /** @@ -570,19 +570,19 @@ CborError cbor_encoder_create_map(CborEncoder *encoder, CborEncoder *mapEncoder, * * \sa cbor_encoder_create_array(), cbor_encoder_create_map() */ -CborError cbor_encoder_close_container(CborEncoder *encoder, const CborEncoder *containerEncoder) +CborError cbor_encoder_close_container(CborEncoder *parentEncoder, const CborEncoder *containerEncoder) { // synchronise buffer state with that of the container - encoder->end = containerEncoder->end; - encoder->data = containerEncoder->data; + parentEncoder->end = containerEncoder->end; + parentEncoder->data = containerEncoder->data; if (containerEncoder->flags & CborIteratorFlag_UnknownLength) - return append_byte_to_buffer(encoder, BreakByte); + return append_byte_to_buffer(parentEncoder, BreakByte); if (containerEncoder->remaining != 1) return containerEncoder->remaining == 0 ? CborErrorTooManyItems : CborErrorTooFewItems; - if (!encoder->end) + if (!parentEncoder->end) return CborErrorOutOfMemory; /* keep the state */ return CborNoError; diff --git a/src/3rdparty/tinycbor/src/cborerrorstrings.c b/src/3rdparty/tinycbor/src/cborerrorstrings.c index 9c2e9750c6..44f766a3c4 100644 --- a/src/3rdparty/tinycbor/src/cborerrorstrings.c +++ b/src/3rdparty/tinycbor/src/cborerrorstrings.c @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2019 Intel Corporation +** Copyright (C) 2021 Intel Corporation ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and associated documentation files (the "Software"), to deal diff --git a/src/3rdparty/tinycbor/src/cborinternal_p.h b/src/3rdparty/tinycbor/src/cborinternal_p.h index 8dc0c13d3c..16269e6301 100644 --- a/src/3rdparty/tinycbor/src/cborinternal_p.h +++ b/src/3rdparty/tinycbor/src/cborinternal_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2019 Intel Corporation +** Copyright (C) 2021 Intel Corporation ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and associated documentation files (the "Software"), to deal diff --git a/src/3rdparty/tinycbor/src/cborparser.c b/src/3rdparty/tinycbor/src/cborparser.c index 074af11209..74d91a30e0 100644 --- a/src/3rdparty/tinycbor/src/cborparser.c +++ b/src/3rdparty/tinycbor/src/cborparser.c @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2019 Intel Corporation +** Copyright (C) 2021 Intel Corporation ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and associated documentation files (the "Software"), to deal @@ -1147,7 +1147,7 @@ static CborError get_string_chunk(CborValue *it, const void **bufferptr, size_t */ CborError _cbor_value_get_string_chunk(const CborValue *value, const void **bufferptr, - size_t *len, CborValue *next) + size_t *len, CborValue *next) { CborValue tmp; if (!next) diff --git a/src/3rdparty/tinycbor/tests/.gitignore b/src/3rdparty/tinycbor/tests/.gitignore index e65577d287..f5db2a8224 100644 --- a/src/3rdparty/tinycbor/tests/.gitignore +++ b/src/3rdparty/tinycbor/tests/.gitignore @@ -5,6 +5,8 @@ release target_wrapper.* # The executables +c90/c90 +c90/c90.exe cpp/cpp cpp/cpp.exe encoder/encoder diff --git a/src/3rdparty/tinycbor/tests/encoder/data.cpp b/src/3rdparty/tinycbor/tests/encoder/data.cpp index df1471548e..6dca49d41c 100644 --- a/src/3rdparty/tinycbor/tests/encoder/data.cpp +++ b/src/3rdparty/tinycbor/tests/encoder/data.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2019 Intel Corporation +** Copyright (C) 2021 Intel Corporation ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and associated documentation files (the "Software"), to deal diff --git a/src/3rdparty/tinycbor/tests/encoder/tst_encoder.cpp b/src/3rdparty/tinycbor/tests/encoder/tst_encoder.cpp index 458f55eb10..31c29152f9 100644 --- a/src/3rdparty/tinycbor/tests/encoder/tst_encoder.cpp +++ b/src/3rdparty/tinycbor/tests/encoder/tst_encoder.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 Intel Corporation +** Copyright (C) 2021 Intel Corporation ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and associated documentation files (the "Software"), to deal diff --git a/src/3rdparty/tinycbor/tests/parser/data.cpp b/src/3rdparty/tinycbor/tests/parser/data.cpp index 0fe2e22544..f701a5a5b0 100644 --- a/src/3rdparty/tinycbor/tests/parser/data.cpp +++ b/src/3rdparty/tinycbor/tests/parser/data.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2019 Intel Corporation +** Copyright (C) 2021 Intel Corporation ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and associated documentation files (the "Software"), to deal diff --git a/src/3rdparty/tinycbor/tests/parser/tst_parser.cpp b/src/3rdparty/tinycbor/tests/parser/tst_parser.cpp index b8e51619b8..91a65a00ba 100644 --- a/src/3rdparty/tinycbor/tests/parser/tst_parser.cpp +++ b/src/3rdparty/tinycbor/tests/parser/tst_parser.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2019 Intel Corporation +** Copyright (C) 2021 Intel Corporation ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and associated documentation files (the "Software"), to deal |