mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 00:38:27 +01:00
Allow mixed configuration in compilation units (issue #809)
This commit is contained in:
@@ -11,8 +11,7 @@
|
||||
#include "./endianess.hpp"
|
||||
#include "./ieee754.hpp"
|
||||
|
||||
namespace ArduinoJson {
|
||||
namespace Internals {
|
||||
namespace ARDUINOJSON_NAMESPACE {
|
||||
|
||||
template <typename TReader, typename TStringStorage>
|
||||
class MsgPackDeserializer {
|
||||
@@ -69,7 +68,7 @@ class MsgPackDeserializer {
|
||||
return readInteger<uint32_t>(variant);
|
||||
|
||||
case 0xcf:
|
||||
#if ARDUINOJSON_USE_LONG_LONG || ARDUINOJSON_USE_INT64
|
||||
#if ARDUINOJSON_USE_LONG_LONG
|
||||
return readInteger<uint64_t>(variant);
|
||||
#else
|
||||
readInteger<uint32_t>();
|
||||
@@ -86,7 +85,7 @@ class MsgPackDeserializer {
|
||||
return readInteger<int32_t>(variant);
|
||||
|
||||
case 0xd3:
|
||||
#if ARDUINOJSON_USE_LONG_LONG || ARDUINOJSON_USE_INT64
|
||||
#if ARDUINOJSON_USE_LONG_LONG
|
||||
return readInteger<int64_t>(variant);
|
||||
#else
|
||||
if (!skip(4)) return DeserializationError::IncompleteInput;
|
||||
@@ -297,30 +296,25 @@ class MsgPackDeserializer {
|
||||
TStringStorage _stringStorage;
|
||||
uint8_t _nestingLimit;
|
||||
};
|
||||
} // namespace Internals
|
||||
|
||||
template <typename TDocument, typename TInput>
|
||||
DeserializationError deserializeMsgPack(TDocument &doc, const TInput &input) {
|
||||
using namespace Internals;
|
||||
return deserialize<MsgPackDeserializer>(doc, input);
|
||||
}
|
||||
|
||||
template <typename TDocument, typename TInput>
|
||||
DeserializationError deserializeMsgPack(TDocument &doc, TInput *input) {
|
||||
using namespace Internals;
|
||||
return deserialize<MsgPackDeserializer>(doc, input);
|
||||
}
|
||||
|
||||
template <typename TDocument, typename TInput>
|
||||
DeserializationError deserializeMsgPack(TDocument &doc, TInput *input,
|
||||
size_t inputSize) {
|
||||
using namespace Internals;
|
||||
return deserialize<MsgPackDeserializer>(doc, input, inputSize);
|
||||
}
|
||||
|
||||
template <typename TDocument, typename TInput>
|
||||
DeserializationError deserializeMsgPack(TDocument &doc, TInput &input) {
|
||||
using namespace Internals;
|
||||
return deserialize<MsgPackDeserializer>(doc, input);
|
||||
}
|
||||
} // namespace ArduinoJson
|
||||
} // namespace ARDUINOJSON_NAMESPACE
|
||||
|
||||
Reference in New Issue
Block a user