Skip to content

Commit 9eae0cd

Browse files
committed
[common] Add Arduino emptyString declaration
1 parent 37f096d commit 9eae0cd

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

builder/utils/cores.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def env_add_core_sources(env: Environment, queue, name: str, path: str) -> bool:
5151
"+<compat/*.c*>",
5252
"+<port/*.c*>",
5353
"+<posix/*.c>",
54-
"+<wiring/*.c>",
54+
"+<wiring/*.c*>",
5555
"+<wraps/*.c>",
5656
],
5757
includes=[

cores/common/arduino/src/wiring/wiring_compat.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ String ipToString(const IPAddress &ip) {
77
sprintf(szRet, "%hhu.%hhu.%hhu.%hhu", ip[0], ip[1], ip[2], ip[3]);
88
return String(szRet);
99
}
10+
11+
// global empty string to allow returning const String& with nothing
12+
const String emptyString;

cores/common/arduino/src/wiring/wiring_compat.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ extern "C" {
3535

3636
#ifdef __cplusplus
3737
String ipToString(const IPAddress &ip);
38+
extern const String emptyString;
3839
#endif
3940

4041
#ifdef __cplusplus

0 commit comments

Comments
 (0)