-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove Parser::statusToInt(). (#21288)
The motivation is that the int errno is implementation-specific (in this case defined by http-parser). Removing this method from the abstract Parser interface and changing ParserCallbacks::setAndCheckCallbackStatus* methods to return ParserStatus instead of this implementation-specific int will make it simpler to add another Parser implementation, one not based on http-parser. Instead of applying statusToInt() within setAndCheckCallbackStatus() and setAndCheckCallbackStatusOr() before returning in ConnectionImpl, return ParserStatus, and apply statusToInt() within LegacyHttpParserImpl. This allows statusToInt() to be moved to legacy_parser_impl.cc anonymous namespace, right next to its counterpart intToStatus(). Tracking issue: #21245 Signed-off-by: Bence Béky <bnc@google.com>
- Loading branch information
Showing
5 changed files
with
37 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters