Fixed compilation error when isdigit() is a macro (fixes #1487)

This commit is contained in:
Benoit Blanchon
2021-02-02 10:08:10 +01:00
parent c72eccdd35
commit d2174d1580
3 changed files with 12 additions and 0 deletions

View File

@ -6,6 +6,7 @@ HEAD
* Made `JsonDocument`'s destructor protected (issue #1480)
* Added missing calls to `client.stop()` in `JsonHttpClient.ino` (issue #1485)
* Fixed error `expected ')' before 'char'` when `isdigit()` is a macro (issue #1487)
v6.17.2 (2020-11-14)
-------

View File

@ -39,6 +39,15 @@
#define _max()
#define _min()
// Realtek Ameba
#define isdigit(c) (((c) >= '0') && ((c) <= '9'))
#define isprint(c)
#define isxdigit(c)
#define isspace(c)
#define isupper(c)
#define islower(c)
#define isalpha(c)
// issue #839
#define BLOCKSIZE
#define CAPACITY

View File

@ -8,9 +8,11 @@
namespace ARDUINOJSON_NAMESPACE {
#ifndef isdigit
inline bool isdigit(char c) {
return '0' <= c && c <= '9';
}
#endif
inline bool issign(char c) {
return '-' == c || c == '+';