From dcfb7ab1930a6d2f5ca36bb28755d8637c87725e Mon Sep 17 00:00:00 2001 From: Danny Willems Date: Mon, 19 Dec 2022 00:05:46 +0100 Subject: [PATCH 1/3] Fix #136: deprecated callback, use caml_callback --- src/c/generate_c_functions.ml | 2 +- src/c/generate_types_start.ml | 2 +- src/c/helpers.c | 4 ++-- src/c/helpers.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/c/generate_c_functions.ml b/src/c/generate_c_functions.ml index 468fa204..e62c7245 100644 --- a/src/c/generate_c_functions.ml +++ b/src/c/generate_c_functions.ml @@ -6,10 +6,10 @@ let () = print_endline "#include \"windows_version.h\""; print_endline "#include "; + print_endline "#include "; print_endline "#include "; print_endline "#include "; print_endline "#include "; - print_endline "#include "; print_endline "#include \"helpers.h\""; Cstubs.write_c diff --git a/src/c/generate_types_start.ml b/src/c/generate_types_start.ml index 8fcc92c7..a1809212 100644 --- a/src/c/generate_types_start.ml +++ b/src/c/generate_types_start.ml @@ -5,9 +5,9 @@ let () = print_endline "#include \"windows_version.h\""; + print_endline "#include "; print_endline "#include "; print_endline "#include "; - print_endline "#include "; print_endline "#include \"helpers.h\""; Cstubs_structs.write_c diff --git a/src/c/helpers.c b/src/c/helpers.c index c45e11d6..efdbb6df 100644 --- a/src/c/helpers.c +++ b/src/c/helpers.c @@ -523,9 +523,9 @@ int luv_once_init(uv_once_t *guard) return 0; } -CAMLprim value luv_set_once_callback(value callback) +CAMLprim value luv_set_once_callback(value vcallback) { - uv_key_set(&luv_once_callback_key, (void*)callback); + uv_key_set(&luv_once_callback_key, (void*)vcallback); return Val_unit; } diff --git a/src/c/helpers.h b/src/c/helpers.h index d953f9f8..e39b0731 100644 --- a/src/c/helpers.h +++ b/src/c/helpers.h @@ -148,7 +148,7 @@ int luv_thread_create_c( // Helpers for uv_once. int luv_once_init(uv_once_t *guard); -CAMLprim value luv_set_once_callback(value callback); +CAMLprim value luv_set_once_callback(value vcallback); From cb0cd054c2b241291d11bef079e00c60a47daf4f Mon Sep 17 00:00:00 2001 From: Danny Willems Date: Mon, 19 Dec 2022 00:07:23 +0100 Subject: [PATCH 2/3] GitHub: test with ocaml.4.14.0 --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5ce29ead..630eda2f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,7 @@ jobs: os: - ubuntu-latest ocaml: + - 4.14.0 - 4.13.1 - 4.02.3 include: From 3439fab8147a8802d8976d7ef579ccbcaab49123 Mon Sep 17 00:00:00 2001 From: Danny Willems Date: Mon, 19 Dec 2022 00:10:19 +0100 Subject: [PATCH 3/3] GitHub Workflow: ocaml-compiler replaces ocaml-version --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 630eda2f..2d6ff324 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: submodules: recursive - uses: ocaml/setup-ocaml@v2 with: - ocaml-version: ${{ matrix.ocaml }} + ocaml-compiler: ${{ matrix.ocaml }} - run: opam depext -y conf-pkg-config - run: opam install -y --deps-only . - run: opam exec -- dune build -p luv