Skip to content

Commit fa38ce4

Browse files
committed
allow cbuf as chain
1 parent 46c096b commit fa38ce4

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

cores/esp8266/cbuf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include "c_types.h"
2323

2424
cbuf::cbuf(size_t size) :
25-
_size(size), _buf(new char[size]), _bufend(_buf + size), _begin(_buf), _end(_begin) {
25+
next(NULL), _size(size), _buf(new char[size]), _bufend(_buf + size), _begin(_buf), _end(_begin) {
2626
}
2727

2828
cbuf::~cbuf() {

cores/esp8266/cbuf.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ class cbuf {
5656
void flush();
5757
size_t remove(size_t size);
5858

59+
cbuf *next;
60+
5961
private:
6062
inline char* wrap_if_bufend(char* ptr) const {
6163
return (ptr == _bufend) ? _buf : ptr;
@@ -66,6 +68,7 @@ class cbuf {
6668
const char* _bufend;
6769
char* _begin;
6870
char* _end;
71+
6972
};
7073

7174
#endif//__cbuf_h

0 commit comments

Comments
 (0)