From 8dacb114aa93de1ca7d057ddbfe6342d3468e7e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Wed, 5 Jan 2022 14:41:41 +0100 Subject: [PATCH] Fully initialize custom_operations job_ops It was missing an initializer for `.compare_ext` (since 3.12.1), the default is `custom_compare_ext_default`; and `.fixed_length` (since 4.08.0) for which `NULL` is good. --- src/unix/lwt_libev_stubs.c | 10 ++++++++-- src/unix/lwt_unix_stubs.c | 5 ++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/unix/lwt_libev_stubs.c b/src/unix/lwt_libev_stubs.c index 4d942a496..70238fe1d 100644 --- a/src/unix/lwt_libev_stubs.c +++ b/src/unix/lwt_libev_stubs.c @@ -67,7 +67,10 @@ static long hash_loop(value loop) { return (long)Ev_loop_val(loop); } static struct custom_operations loop_ops = { "lwt.libev.loop", custom_finalize_default, compare_loops, - hash_loop, custom_serialize_default, custom_deserialize_default}; + hash_loop, custom_serialize_default, custom_deserialize_default, + custom_compare_ext_default, + NULL +}; /* Do nothing. @@ -125,7 +128,10 @@ static long hash_watcher(value watcher) { return (long)Ev_io_val(watcher); } static struct custom_operations watcher_ops = { "lwt.libev.watcher", custom_finalize_default, compare_watchers, - hash_watcher, custom_serialize_default, custom_deserialize_default}; + hash_watcher, custom_serialize_default, custom_deserialize_default, + custom_compare_ext_default, + NULL +}; /* +-----------------------------------------------------------------+ | IO watchers | diff --git a/src/unix/lwt_unix_stubs.c b/src/unix/lwt_unix_stubs.c index 29535378c..bfbae6443 100644 --- a/src/unix/lwt_unix_stubs.c +++ b/src/unix/lwt_unix_stubs.c @@ -1021,7 +1021,10 @@ static void *worker_loop(void *data) { /* Description of jobs. */ struct custom_operations job_ops = { "lwt.unix.job", custom_finalize_default, custom_compare_default, - custom_hash_default, custom_serialize_default, custom_deserialize_default}; + custom_hash_default, custom_serialize_default, custom_deserialize_default, + custom_compare_ext_default, + NULL +}; /* Get the job structure contained in a custom value. */ #define Job_val(v) *(lwt_unix_job *)Data_custom_val(v)