-
Notifications
You must be signed in to change notification settings - Fork 110
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
Improve safety of BIO api #751
Merged
Merged
Commits on Aug 4, 2023
-
The bio extension methods _erroneously_ assume that the buffer is an input-buffer; this is blatantly false with delimited input buffers, and also alternative implementations of buffers if someone is so inclined. This fixes the problem by checking the exact type and only apply the dangerous stuff if it is an exact instance; otherwise fallback to generic methods. This applies for the inline methods and also read-char/peek-char. This in turn necessitated the introduction of a `put-back` method to the BufferedReader interface, otherwise generic read-char and peek-char implementations are impossible to implement correctly. I reckon this will be generally useful for parsers, so it's not abstraction leakage. It also fixes the issue with get-buffer-output-* not flushing the buffer before retrieving the output.
Configuration menu - View commit details
-
Copy full SHA for 88b6ef9 - Browse repository at this point
Copy the full SHA 88b6ef9View commit details -
Configuration menu - View commit details
-
Copy full SHA for ccea28a - Browse repository at this point
Copy the full SHA ccea28aView commit details
Commits on Aug 5, 2023
-
Configuration menu - View commit details
-
Copy full SHA for bb67933 - Browse repository at this point
Copy the full SHA bb67933View commit details -
Separate input from output file io.
So that we can't cast from one to the other, which would be a disaster as the file is open in different directions.
Configuration menu - View commit details
-
Copy full SHA for e5e8d9a - Browse repository at this point
Copy the full SHA e5e8d9aView commit details -
Configuration menu - View commit details
-
Copy full SHA for e43c830 - Browse repository at this point
Copy the full SHA e43c830View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3926b8d - Browse repository at this point
Copy the full SHA 3926b8dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 05e6073 - Browse repository at this point
Copy the full SHA 05e6073View commit details -
- add notes for put-back behavior. - add thread safety notes for general Reader/Writer behavior.
Configuration menu - View commit details
-
Copy full SHA for 367ee49 - Browse repository at this point
Copy the full SHA 367ee49View commit details -
Configuration menu - View commit details
-
Copy full SHA for f496789 - Browse repository at this point
Copy the full SHA f496789View commit details -
Configuration menu - View commit details
-
Copy full SHA for 893359e - Browse repository at this point
Copy the full SHA 893359eView commit details -
Configuration menu - View commit details
-
Copy full SHA for bad6415 - Browse repository at this point
Copy the full SHA bad6415View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.