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

Release 5.8.0 #1029

Merged
merged 5 commits into from
Oct 25, 2024
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
24 changes: 24 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
===== 5.8.0 =====

====== Improvements ======

* Make Lwt_seq.of_list lazier, make Lwt_set.to_list tail-rec. (Samer Abdallah, #1019)

* Convert more Lwt.fail into raise to increase availibility of backtraces. (#1008)

====== Documentation ======

* Small fixes. (Nils André, #1001, #1006)

* Convert manual to mld. (#951, Antonin Décimo)

====== Other ======

* Many improbements to the CI. (Sora Morimoto, Idir Lankri, #986, #1009, #1011, #1013, #1014, #1016, #1020, #1021, #1023, #1024, #1025)

* Improbements to the packaging. (Sora Morimoto, #1010, #1015)

* Make C code pass the stricter checks of GCC 14. (Jerry James, #1004)

* Fix many many C warnings and other fixes. (Antonin Décimo, #1007, #1022)

===== 5.7.0 =====

====== Breaking API changes ======
Expand Down
3 changes: 2 additions & 1 deletion lwt.opam
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ depends: [
depopts: ["base-threads" "base-unix" "conf-libev"]
dev-repo: "git+https://github.com/ocsigen/lwt.git"
build: [
["dune" "subst"] {pinned}
["dune" "subst"] {dev}
[
"dune"
"exec"
Expand All @@ -54,3 +54,4 @@ build: [
"@doc" {with-doc}
]
]
available: os-family != "windows" | "ocaml-version" < "5.2"
2 changes: 1 addition & 1 deletion lwt.opam.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
build: [
["dune" "subst"] {pinned}
["dune" "subst"] {dev}
[
"dune"
"exec"
Expand Down
2 changes: 1 addition & 1 deletion lwt_ppx.opam
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ depends: [
"lwt"
]
build: [
["dune" "subst"] {pinned}
["dune" "subst"] {dev}
[
"dune"
"build"
Expand Down
2 changes: 1 addition & 1 deletion lwt_ppx_let.opam
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ depends: [
"lwt"
]
build: [
["dune" "subst"] {pinned}
["dune" "subst"] {dev}
[
"dune"
"build"
Expand Down
2 changes: 1 addition & 1 deletion lwt_react.opam
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ depends: [
"react" {>= "1.0.0"}
]
build: [
["dune" "subst"] {pinned}
["dune" "subst"] {dev}
[
"dune"
"build"
Expand Down
7 changes: 6 additions & 1 deletion src/unix/lwt_unix.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@
#include <caml/socketaddr.h>
#include <string.h>

// The following macro is for backwards compatibility.
// It is given an `lwt_` prefix to avoid name collisions for code which
// include both this file and alloc.h.
#if OCAML_VERSION < 50000
#define caml_convert_flag_list(flags, table) \
#define lwt_convert_flag_list(flags, table) \
caml_convert_flag_list((flags), (int *)(table))
#else
#define lwt_convert_flag_list caml_convert_flag_list
#endif

/* The macro to get the file-descriptor from a value. */
Expand Down
2 changes: 1 addition & 1 deletion src/unix/unix_c/unix_bytes_recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ value lwt_unix_bytes_recv(value fd, value buf, value ofs, value len,
int ret;
ret =
recv(Int_val(fd), (char *)Caml_ba_array_val(buf)->data + Long_val(ofs),
Long_val(len), caml_convert_flag_list(flags, msg_flag_table));
Long_val(len), lwt_convert_flag_list(flags, msg_flag_table));
if (ret == -1) uerror("recv", Nothing);
return Val_int(ret);
}
Expand Down
2 changes: 1 addition & 1 deletion src/unix/unix_c/unix_bytes_recvfrom.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ value lwt_unix_bytes_recvfrom(value fd, value buf, value ofs, value len,
socklen_t addr_len;
addr_len = sizeof(addr);
ret = recvfrom(Int_val(fd), (char *)Caml_ba_data_val(buf) + Long_val(ofs),
Long_val(len), caml_convert_flag_list(flags, msg_flag_table),
Long_val(len), lwt_convert_flag_list(flags, msg_flag_table),
&addr.s_gen, &addr_len);
if (ret == -1) uerror("recvfrom", Nothing);
address = alloc_sockaddr(&addr, addr_len, -1);
Expand Down
2 changes: 1 addition & 1 deletion src/unix/unix_c/unix_bytes_send.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ value lwt_unix_bytes_send(value fd, value buf, value ofs, value len,
int ret;
ret =
send(Int_val(fd), (char *)Caml_ba_array_val(buf)->data + Long_val(ofs),
Long_val(len), caml_convert_flag_list(flags, msg_flag_table));
Long_val(len), lwt_convert_flag_list(flags, msg_flag_table));
if (ret == -1) uerror("send", Nothing);
return Val_int(ret);
}
Expand Down
2 changes: 1 addition & 1 deletion src/unix/unix_c/unix_bytes_sendto.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ value lwt_unix_bytes_sendto(value fd, value buf, value ofs, value len,
int ret;
get_sockaddr(dest, &addr, &addr_len);
ret = sendto(Int_val(fd), (char *)Caml_ba_data_val(buf) + Long_val(ofs),
Long_val(len), caml_convert_flag_list(flags, msg_flag_table),
Long_val(len), lwt_convert_flag_list(flags, msg_flag_table),
&addr.s_gen, addr_len);
if (ret == -1) uerror("send", Nothing);
return Val_int(ret);
Expand Down
2 changes: 1 addition & 1 deletion src/unix/unix_c/unix_getnameinfo_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ CAMLprim value lwt_unix_getnameinfo_job(value sockaddr, value opts)
{
LWT_UNIX_INIT_JOB(job, getnameinfo, 0);
get_sockaddr(sockaddr, &job->addr, &job->addr_len);
job->opts = caml_convert_flag_list(opts, getnameinfo_flag_table);
job->opts = lwt_convert_flag_list(opts, getnameinfo_flag_table);
return lwt_unix_alloc_job(&job->job);
}
#endif
4 changes: 2 additions & 2 deletions src/unix/unix_c/unix_open_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ static value result_open(struct job_open *job)
CAMLprim value lwt_unix_open_job(value name, value flags, value perms)
{
LWT_UNIX_INIT_JOB_STRING(job, open, 0, name);
job->fd = caml_convert_flag_list(flags, open_cloexec_table);
job->flags = caml_convert_flag_list(flags, open_flag_table);
job->fd = lwt_convert_flag_list(flags, open_cloexec_table);
job->flags = lwt_convert_flag_list(flags, open_flag_table);
job->perms = Int_val(perms);
return lwt_unix_alloc_job(&(job->job));
}
Expand Down
2 changes: 1 addition & 1 deletion src/unix/unix_c/unix_recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ value lwt_unix_recv(value fd, value buf, value ofs, value len, value flags)
{
int ret;
ret = recv(Int_val(fd), &Byte(String_val(buf), Long_val(ofs)),
Long_val(len), caml_convert_flag_list(flags, msg_flag_table));
Long_val(len), lwt_convert_flag_list(flags, msg_flag_table));
if (ret == -1) uerror("recv", Nothing);
return Val_int(ret);
}
Expand Down
2 changes: 1 addition & 1 deletion src/unix/unix_c/unix_recvfrom.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ value lwt_unix_recvfrom(value fd, value buf, value ofs, value len, value flags)
socklen_t addr_len;
addr_len = sizeof(addr);
ret = recvfrom(Int_val(fd), &Byte(String_val(buf), Long_val(ofs)),
Long_val(len), caml_convert_flag_list(flags, msg_flag_table),
Long_val(len), lwt_convert_flag_list(flags, msg_flag_table),
&addr.s_gen, &addr_len);
if (ret == -1) uerror("recvfrom", Nothing);
address = alloc_sockaddr(&addr, addr_len, -1);
Expand Down
2 changes: 1 addition & 1 deletion src/unix/unix_c/unix_send.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ value lwt_unix_send(value fd, value buf, value ofs, value len, value flags)
{
int ret;
ret = send(Int_val(fd), &Byte(String_val(buf), Long_val(ofs)),
Long_val(len), caml_convert_flag_list(flags, msg_flag_table));
Long_val(len), lwt_convert_flag_list(flags, msg_flag_table));
if (ret == -1) uerror("send", Nothing);
return Val_int(ret);
}
Expand Down
2 changes: 1 addition & 1 deletion src/unix/unix_c/unix_sendto.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ value lwt_unix_sendto(value fd, value buf, value ofs, value len, value flags,
int ret;
get_sockaddr(dest, &addr, &addr_len);
ret = sendto(Int_val(fd), &Byte(String_val(buf), Long_val(ofs)),
Long_val(len), caml_convert_flag_list(flags, msg_flag_table),
Long_val(len), lwt_convert_flag_list(flags, msg_flag_table),
&addr.s_gen, addr_len);
if (ret == -1) uerror("send", Nothing);
return Val_int(ret);
Expand Down
2 changes: 1 addition & 1 deletion src/unix/unix_c/unix_wait4.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ value lwt_unix_wait4(value flags, value pid_req)
CAMLlocal2(times, res);

int pid, status, cv_flags;
cv_flags = caml_convert_flag_list(flags, wait_flag_table);
cv_flags = lwt_convert_flag_list(flags, wait_flag_table);

struct rusage ru;

Expand Down
Loading