[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] pvm: add `pvm_sizeof (PVM_NULL) == 0`
From: |
Jose E. Marchesi |
Subject: |
Re: [PATCH] pvm: add `pvm_sizeof (PVM_NULL) == 0` |
Date: |
Sat, 21 Jan 2023 23:50:29 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hi Mohammad.
This is OK for master, but please add a note to the comment block of the
`siz' instruction noting that, by convention, the size of a PVM_NULL is
0UL.
Thanks!
> 2023-01-19 Mohammad-Reza Nabipoor <mnabipoor@gnu.org>
>
> * libpoke/pvm-val.c (pvm_sizeof): Add case for `PVM_NULL'.
> ---
> ChangeLog | 4 ++++
> libpoke/pvm-val.c | 2 ++
> 2 files changed, 6 insertions(+)
>
> diff --git a/ChangeLog b/ChangeLog
> index b67d08b9..a184610e 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,7 @@
> +2023-01-19 Mohammad-Reza Nabipoor <mnabipoor@gnu.org>
> +
> + * libpoke/pvm-val.c (pvm_sizeof): Add case for `PVM_NULL'.
> +
> 2023-01-20 Jose E. Marchesi <jemarch@gnu.org>
>
> * configure.ac: Report missing gensub-capable awk at configure
> diff --git a/libpoke/pvm-val.c b/libpoke/pvm-val.c
> index 2c6175dc..b8a3eb31 100644
> --- a/libpoke/pvm-val.c
> +++ b/libpoke/pvm-val.c
> @@ -986,6 +986,8 @@ pvm_sizeof (pvm_val val)
> else if (PVM_IS_CLS (val))
> /* By convention, closure values have size zero. */
> return 0;
> + else if (val == PVM_NULL)
> + return 0;
>
> assert (0);
> return 0;