Skip to content

Commit cdd72f9

Browse files
committed
define indicating a breaking change
1 parent bf9ad75 commit cdd72f9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cores/esp8266/Stream.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@
3838
readBytesBetween( pre_string, terminator, buffer, length)
3939
*/
4040

41+
// Arduino `Client: public Stream` class defines `virtual int read(uint8_t *buf, size_t size) = 0;`
42+
// This function is now imported into `Stream::` for `Stream::to*()`.
43+
// Other classes inheriting from `Stream::` and implementing `read(uint8_t *buf, size_t size)`
44+
// must consequently use `int` as return type, namely Hardware/SoftwareSerial, FileSystems...
45+
#define STREAM_READ_RETURNS_INT 1
46+
4147
class Stream: public Print {
4248
protected:
4349
unsigned long _timeout; // number of milliseconds to wait for the next char before aborting timed read

0 commit comments

Comments
 (0)