Change the default of ARDUINOJSON_USE_LONG_LONG to 1 on 32-bit platforms

This commit is contained in:
Benoit Blanchon
2021-10-18 16:23:59 +02:00
parent 7764515f56
commit e4658e963f
3 changed files with 9 additions and 1 deletions

View File

@ -7,6 +7,7 @@ HEAD
* Remove `ARDUINOJSON_EMBEDDED_MODE` and assume we run on an embedded platform.
Dependent settings (like `ARDUINOJSON_DEFAULT_NESTING_LIMIT`) must be set individually.
* Change the default of `ARDUINOJSON_USE_DOUBLE` to `1`
* Change the default of `ARDUINOJSON_USE_LONG_LONG` to `1` on 32-bit platforms
v6.18.5 (2021-09-28)
-------

View File

@ -1,6 +1,6 @@
#include <ArduinoJson.h>
static_assert(ARDUINOJSON_USE_LONG_LONG == 0, "ARDUINOJSON_USE_LONG_LONG");
static_assert(ARDUINOJSON_USE_LONG_LONG == 1, "ARDUINOJSON_USE_LONG_LONG");
static_assert(ARDUINOJSON_SLOT_OFFSET_SIZE == 2,
"ARDUINOJSON_SLOT_OFFSET_SIZE");

View File

@ -83,6 +83,13 @@
// Store integral values with long (0) or long long (1)
#ifndef ARDUINOJSON_USE_LONG_LONG
# if ARDUINOJSON_HAS_LONG_LONG && defined(__SIZEOF_POINTER__) && \
__SIZEOF_POINTER__ >= 4 || \
defined(_MSC_VER)
# define ARDUINOJSON_USE_LONG_LONG 1
# endif
#endif
#ifndef ARDUINOJSON_USE_LONG_LONG
# define ARDUINOJSON_USE_LONG_LONG 0
#endif