qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: aliguori@us.ibm.com, Herve Poussineau <hpoussin@reactos.org>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [PATCH] win32: use PRId64 instead of %lld
Date: Mon, 25 Jan 2010 12:03:48 -0200	[thread overview]
Message-ID: <20100125120348.461ce622@doriath> (raw)
In-Reply-To: <20100125100905.GA9019@redhat.com>

On Mon, 25 Jan 2010 12:09:06 +0200
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> On Sun, Jan 24, 2010 at 09:23:41PM +0000, Herve Poussineau wrote:
> > Replace %lld occurrences by PRId64.
> > diff --git a/json-lexer.c b/json-lexer.c
> > index 53697c5..9d64920 100644
> > --- a/json-lexer.c
> > +++ b/json-lexer.c
> > @@ -54,6 +54,9 @@ enum json_lexer_state {
> >      IN_ESCAPE,
> >      IN_ESCAPE_L,
> >      IN_ESCAPE_LL,
> > +    IN_ESCAPE_I,
> > +    IN_ESCAPE_I6,
> > +    IN_ESCAPE_I64,
> >      IN_ESCAPE_DONE,
> >      IN_WHITESPACE,
> >      IN_OPERATOR_DONE,
> > @@ -223,6 +226,18 @@ static const uint8_t json_lexer[][256] =  {
> >          ['l'] = IN_ESCAPE_LL,
> >      },
> >  
> > +    [IN_ESCAPE_I64] = {
> > +        ['d'] = IN_ESCAPE_DONE,
> > +    },
> > +
> > +    [IN_ESCAPE_I6] = {
> > +        ['4'] = IN_ESCAPE_I64,
> > +    },
> > +
> > +    [IN_ESCAPE_I] = {
> > +        ['6'] = IN_ESCAPE_I6,
> > +    },
> > +
> >      [IN_ESCAPE] = {
> >          ['d'] = IN_ESCAPE_DONE,
> >          ['i'] = IN_ESCAPE_DONE,
> > @@ -230,6 +245,7 @@ static const uint8_t json_lexer[][256] =  {
> >          ['s'] = IN_ESCAPE_DONE,
> >          ['f'] = IN_ESCAPE_DONE,
> >          ['l'] = IN_ESCAPE_L,
> > +        ['I'] = IN_ESCAPE_I,
> >      },
> >  
> >      /* top level rule */
> 
> 
> Why do we want yet another tag?
> 
> OTOH, Luiz, maybe it is a mistake to use "long"
> in QMP: legal values might vary between platforms.
> How about we get rid of long and only use long long to mean 64
> bit/int to mean 32 bit? Or even redefine "l" to mean 64 bit and "i" to
> mean "32 bit.

 Not that familiar with the parser (Anthony wrote it), but I guess
it will convert any int type (with the limit of int64_t) to
json int.

> Also, why do we allow "d" as synonym of "i"?  Keeping all
> of int/long/long long around does not make sense to me though.  Finally,
> don't we want unsigned values in protocol?

 JSON doesn't support them.

  reply	other threads:[~2010-01-25 14:04 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-24 21:23 [Qemu-devel] [PATCH] win32: use PRId64 instead of %lld Herve Poussineau
2010-01-25 10:09 ` [Qemu-devel] " Michael S. Tsirkin
2010-01-25 14:03   ` Luiz Capitulino [this message]
2010-01-25 14:35     ` Markus Armbruster
2010-01-25 15:27       ` Luiz Capitulino
2010-01-25 15:38         ` Michael S. Tsirkin
2010-01-26 11:43           ` Luiz Capitulino
2010-01-26 12:37             ` Markus Armbruster
2010-01-26 12:56               ` Anthony Liguori
2010-01-26 12:56                 ` Michael S. Tsirkin
2010-01-26 13:05                   ` Anthony Liguori
2010-01-26 13:12                     ` Michael S. Tsirkin
2010-01-26 12:47             ` Anthony Liguori
2010-01-26 12:46               ` Michael S. Tsirkin
2010-01-26 12:58                 ` Anthony Liguori
2010-01-26 13:01                   ` Michael S. Tsirkin
2010-01-26 13:13                     ` Anthony Liguori
2010-01-26 13:08                   ` Daniel P. Berrange
2010-01-26 13:15                     ` Anthony Liguori
2010-01-26 13:55               ` Avi Kivity
2010-01-26 14:05                 ` Anthony Liguori
2010-01-26 14:12                   ` Avi Kivity
2010-01-26 14:38                     ` Anthony Liguori
2010-01-25 17:32   ` Stefan Weil
2010-01-25 17:47     ` Michael S. Tsirkin
2010-01-25 19:23       ` Stefan Weil
2010-01-25 19:32         ` Michael S. Tsirkin
2010-01-25 19:34           ` Michael S. Tsirkin
2010-01-25 19:51       ` Daniel P. Berrange
2010-01-25 19:41     ` Stefan Weil
2010-01-26 22:40 ` [Qemu-devel] " Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100125120348.461ce622@doriath \
    --to=lcapitulino@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=hpoussin@reactos.org \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).