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

Minor clean-ups in runtime/io.c and runtime/caml/io.h #10136

Merged
merged 8 commits into from
Jan 24, 2021

Commits on Jan 8, 2021

  1. Remove the "for Cash only" fields revealed and old_revealed

    Cash (http://pauillac.inria.fr/cash/) was an experiment in
    using OCaml for shell scripting.  The project is no longer active and
    the old code does not compile with OCaml 4.
    xavierleroy committed Jan 8, 2021
    Configuration menu
    Copy the full SHA
    9656815 View commit details
    Browse the repository at this point in the history

Commits on Jan 21, 2021

  1. Refactor caml_ml_close_channel

    Control flow can be simplified, removing the `do_syscall` variable.
    xavierleroy committed Jan 21, 2021
    Configuration menu
    Copy the full SHA
    c2f42c7 View commit details
    Browse the repository at this point in the history
  2. Use Tag_cons from <caml/mlvalues.h>

    To match `Val_emptylist`.
    xavierleroy committed Jan 21, 2021
    Configuration menu
    Copy the full SHA
    bf8e44c View commit details
    Browse the repository at this point in the history
  3. Turn caml_getch and caml_putch into functions

    These I/O operations used to be defined as macros in <caml/io.h>, but
    they are not speed-critical, so it's cleaner to have them as
    functions, like all other I/O operations in this file.
    xavierleroy committed Jan 21, 2021
    Configuration menu
    Copy the full SHA
    f7e32a3 View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2021

  1. In out_channels_list, report channels opened from OCaml only

    Previously, output channels opened from C were also reported in this list,
    causing `Stdlib.flush_all` to flush them.  This feels wrong, as
    channels opened from C are entirely managed from C code.
    
    With this commit, output channels opened from C always have a
    reference count of 0: `caml_alloc_channel` is no longer called with
    one of these channels, and it's the only function that increases refcount.
    Hence the refcount check in `caml_close_channel` can be removed.
    xavierleroy committed Jan 24, 2021
    Configuration menu
    Copy the full SHA
    aeb785e View commit details
    Browse the repository at this point in the history
  2. Remove misleading comment

    `caml_allc_custom_mem` cannot trigger finalization any longer.
    xavierleroy committed Jan 24, 2021
    Configuration menu
    Copy the full SHA
    6021888 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    07c3295 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    691655c View commit details
    Browse the repository at this point in the history