Browse Source

Fix compatibility with the Blynk libary (fixes #1914)

Benoit Blanchon 2 years ago
parent
commit
52d8a65cbc

+ 5 - 0
CHANGELOG.md

@@ -1,6 +1,11 @@
 ArduinoJson: change log
 =======================
 
+HEAD
+----
+
+* Fix compatibility with the Blynk libary (issue #1914)
+
 v6.21.2 (2023-04-12)
 -------
 

+ 1 - 0
extras/scripts/publish.sh

@@ -46,6 +46,7 @@ update_version_in_source () {
 		-e "s/ARDUINOJSON_VERSION_MAJOR .*$/ARDUINOJSON_VERSION_MAJOR $MAJOR/" \
 		-e "s/ARDUINOJSON_VERSION_MINOR .*$/ARDUINOJSON_VERSION_MINOR $MINOR/" \
 		-e "s/ARDUINOJSON_VERSION_REVISION .*$/ARDUINOJSON_VERSION_REVISION $REVISION/" \
+		-e "s/ARDUINOJSON_VERSION_MACRO .*$/ARDUINOJSON_VERSION_MACRO V$MAJOR$MINOR$REVISION/" \
 		src/ArduinoJson/version.hpp
 	rm src/ArduinoJson/version.hpp*~
 }

+ 3 - 0
extras/tests/Misc/conflicts.cpp

@@ -55,5 +55,8 @@
 // issue #1905
 #define _current
 
+// issue #1914
+#define V6 6
+
 // catch.hpp mutes several warnings, this file also allows to detect them
 #include "ArduinoJson.h"

+ 1 - 3
src/ArduinoJson/Namespace.hpp

@@ -12,9 +12,7 @@
 
 #  define ARDUINOJSON_VERSION_NAMESPACE                                       \
     ARDUINOJSON_CONCAT3(                                                      \
-        ARDUINOJSON_CONCAT4(V, ARDUINOJSON_VERSION_MAJOR,                     \
-                            ARDUINOJSON_VERSION_MINOR,                        \
-                            ARDUINOJSON_VERSION_REVISION),                    \
+        ARDUINOJSON_VERSION_MACRO,                                            \
         ARDUINOJSON_BIN2ALPHA(                                                \
             ARDUINOJSON_ENABLE_PROGMEM, ARDUINOJSON_USE_LONG_LONG,            \
             ARDUINOJSON_USE_DOUBLE, ARDUINOJSON_ENABLE_STRING_DEDUPLICATION), \

+ 0 - 2
src/ArduinoJson/Polyfills/preprocessor.hpp

@@ -8,8 +8,6 @@
 #define ARDUINOJSON_CONCAT2(A, B) ARDUINOJSON_CONCAT_(A, B)
 #define ARDUINOJSON_CONCAT3(A, B, C) \
   ARDUINOJSON_CONCAT2(ARDUINOJSON_CONCAT2(A, B), C)
-#define ARDUINOJSON_CONCAT4(A, B, C, D) \
-  ARDUINOJSON_CONCAT2(ARDUINOJSON_CONCAT2(A, B), ARDUINOJSON_CONCAT2(C, D))
 
 #define ARDUINOJSON_BIN2ALPHA_0000() A
 #define ARDUINOJSON_BIN2ALPHA_0001() B

+ 1 - 0
src/ArduinoJson/version.hpp

@@ -8,3 +8,4 @@
 #define ARDUINOJSON_VERSION_MAJOR 6
 #define ARDUINOJSON_VERSION_MINOR 21
 #define ARDUINOJSON_VERSION_REVISION 2
+#define ARDUINOJSON_VERSION_MACRO V6212