Re: [PATCH] util: json: Add modifier for adding non-negative long values to JSON objects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 02, 2022 at 09:48:28 +0200, Jiri Denemark wrote:
> On Thu, Jun 02, 2022 at 09:45:16 +0200, Peter Krempa wrote:
> > Similarly to the 'k' modifier for integers introduce 'K' for long
> > integers.
> > 
> > Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
> > ---
> >  src/util/virjson.c | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/src/util/virjson.c b/src/util/virjson.c
> > index 6e13e97e15..ae970c7653 100644
> > --- a/src/util/virjson.c
> > +++ b/src/util/virjson.c
> > @@ -121,6 +121,7 @@ virJSONValueGetType(const virJSONValue *value)
> >   *
> >   * I: signed long integer value
> >   * J: signed long integer value, error if negative
> > + * K: signed long integer value, omitted if negative
> >   * Z: signed long integer value, omitted if zero
> >   * Y: signed long integer value, omitted if zero, error if negative
> >   *
> 
> It feels like we're going to run out of the alphabet soon :-)

It's certainly a race between available alphabet letters and the weird
corner case combinations we require in our code, but I'm not sure there
are too many weird corner cases which would come up handy, so I'm not
going to bet which one happens sooner :D

At least this time we already have a letter pre-allocated for this case
;)

> 
> Reviewed-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
> 




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux