Skip to content
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 11 commits into from
Aug 5, 2023
Merged

Improve safety of BIO api #751

merged 11 commits into from
Aug 5, 2023

Commits on Aug 4, 2023

  1. Improve safety of BIO api

    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.
    vyzo committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    88b6ef9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ccea28a View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2023

  1. Configuration menu
    Copy the full SHA
    bb67933 View commit details
    Browse the repository at this point in the history
  2. 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.
    vyzo committed Aug 5, 2023
    Configuration menu
    Copy the full SHA
    e5e8d9a View commit details
    Browse the repository at this point in the history
  3. deduplicate code

    vyzo committed Aug 5, 2023
    Configuration menu
    Copy the full SHA
    e43c830 View commit details
    Browse the repository at this point in the history
  4. build-deps

    vyzo committed Aug 5, 2023
    Configuration menu
    Copy the full SHA
    3926b8d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    05e6073 View commit details
    Browse the repository at this point in the history
  6. update stdio docs

    - add notes for put-back behavior.
    - add thread safety notes for general Reader/Writer behavior.
    vyzo committed Aug 5, 2023
    Configuration menu
    Copy the full SHA
    367ee49 View commit details
    Browse the repository at this point in the history
  7. errata

    vyzo committed Aug 5, 2023
    Configuration menu
    Copy the full SHA
    f496789 View commit details
    Browse the repository at this point in the history
  8. remove unused binding

    vyzo committed Aug 5, 2023
    Configuration menu
    Copy the full SHA
    893359e View commit details
    Browse the repository at this point in the history
  9. update documentation.

    vyzo committed Aug 5, 2023
    Configuration menu
    Copy the full SHA
    bad6415 View commit details
    Browse the repository at this point in the history