All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qmp: add support for mixed typed input visitor
Date: Thu, 14 Jul 2016 10:28:59 -0600	[thread overview]
Message-ID: <5787BDCB.9070205@redhat.com> (raw)
In-Reply-To: <20160714143922.GJ18778@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1110 bytes --]

On 07/14/2016 08:39 AM, Daniel P. Berrange wrote:
> On Thu, Jul 14, 2016 at 08:23:18AM -0600, Eric Blake wrote:
>> On 07/14/2016 08:16 AM, Daniel P. Berrange wrote:
>>> Add a qmp_mixed_input_visitor_new() method which returns
>>> a QMP input visitor that accepts either strings or the
>>> native data types.

Question: do we want to allow: "key":1 when the QAPI is written
'key':'str'?  Your current patches allow the converse (allowing
"key":"1" when the QAPI is written 'key':'int').  To allow native types
to be consumed in mixed-mode where string is expected would require yet
another method for deciding how to handle non-strings in
v->visitor.type_str.  Where it might be useful is in SocketAddress
parsing, in particular where InetSocketAddress.port is currently 'str'
but where it often takes an integer port number in addition to a string
for a named port alias; callers currently have to pass a stringized
integer, where mixed mode might make it easier to fudge things.


-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2016-07-14 16:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-14 14:16 [Qemu-devel] [PATCH] qmp: add support for mixed typed input visitor Daniel P. Berrange
2016-07-14 14:23 ` Eric Blake
2016-07-14 14:39   ` Daniel P. Berrange
2016-07-14 16:28     ` Eric Blake [this message]
2016-07-15 12:48       ` Markus Armbruster
2016-07-20  9:02         ` Markus Armbruster

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=5787BDCB.9070205@redhat.com \
    --to=eblake@redhat.com \
    --cc=berrange@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.