8000 Interrupt safety fixes for HardwareSerial by alltheblinkythings · Pull Request #1213 · esp8266/Arduino · GitHub
[go: up one dir, main page]

Skip to content

Interrupt safety fixes for HardwareSerial #1213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 14, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Make the circular buffer's _size and _bufend members immutable.
  • Loading branch information
alltheblinkythings committed Dec 14, 2015
commit afbc049cc91e91bbd8f50586fdfb3ce874d3f91e
4 changes: 2 additions & 2 deletions cores/esp8266/cbuf.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ class cbuf {
return (ptr == _bufend) ? _buf : ptr;
}

size_t _size;
const size_t _size;
char* _buf;
char* _bufend;
const char* const _bufend;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two time const?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a const pointer to chars which are const, so _bufend is const and *_bufend is const as well.

char* _begin;
char* _end;
};
Expand Down
0