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

Core: remove some mutable to fix warning #899

Merged
merged 2 commits into from
Nov 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion src/core/lwt_mutex.ml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module Lwt_sequence = Lwt_sequence

open Lwt.Infix

type t = { mutable locked : bool; mutable waiters : unit Lwt.u Lwt_sequence.t }
type t = { mutable locked : bool; waiters : unit Lwt.u Lwt_sequence.t }

let create () = { locked = false; waiters = Lwt_sequence.create () }

Expand Down
4 changes: 2 additions & 2 deletions src/core/lwt_sequence.ml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ type 'a t = {
}

type 'a node = {
mutable node_prev : 'a t;
mutable node_next : 'a t;
node_prev : 'a t;
node_next : 'a t;
mutable node_data : 'a;
mutable node_active : bool;
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/lwt_stream.ml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type push = {
(* Thread signaled when a new element is added to the stream. *)
mutable push_waiting : bool;
(* Is a thread waiting on [push_signal] ? *)
mutable push_external : Obj.t;
mutable push_external : Obj.t [@ocaml.warning "-69"];
(* Reference to an external source. *)
}

Expand All @@ -66,7 +66,7 @@ type 'a push_bounded = {
mutable pushb_push_waiter : unit Lwt.t;
mutable pushb_push_wakener : unit Lwt.u;
(* Thread blocked on push. *)
mutable pushb_external : Obj.t;
mutable pushb_external : Obj.t [@ocaml.warning "-69"];
(* Reference to an external source. *)
}

Expand Down