[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] pk_type_code and json schema fixes.
From: |
Jose E. Marchesi |
Subject: |
Re: [PATCH] pk_type_code and json schema fixes. |
Date: |
Mon, 03 Aug 2020 19:47:29 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Hi Kostas.
> diff --git a/libpoke/pk-val.c b/libpoke/pk-val.c
> index 5f9c882c..1fc2c05f 100644
> --- a/libpoke/pk-val.c
> +++ b/libpoke/pk-val.c
> @@ -164,7 +164,10 @@ pk_type_code (pk_val val)
> switch (PVM_VAL_TYP_CODE (val))
> {
> case PVM_TYPE_INTEGRAL:
> - return PK_INT;
> + if ((pk_uint_value (pk_integral_type_signed_p (pk_typeof (val)))))
> + return PK_INT;
> + else
> + return PK_UINT;
> case PVM_TYPE_STRING:
> return PK_STRING;
> case PVM_TYPE_ARRAY:
pk_integral_type_signed_p is documented in libpoke.h to return an
int<32>, not an uint<32>.