[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-2.10 02/10] qapi: Use QNull for a more regul
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH for-2.10 02/10] qapi: Use QNull for a more regular visit_type_null() |
Date: |
Tue, 18 Jul 2017 09:36:02 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 07/18/2017 08:41 AM, Markus Armbruster wrote:
> Make visit_type_null() take an @obj argument like its buddies. This
> helps keeing the next commit simple.
s/keeing/keep/
>
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
> +++ b/qapi/qobject-output-visitor.c
> @@ -187,7 +187,8 @@ static void qobject_output_type_any(Visitor *v, const
> char *name,
> qobject_output_add_obj(qov, name, *obj);
> }
>
> -static void qobject_output_type_null(Visitor *v, const char *name, Error
> **errp)
> +static void qobject_output_type_null(Visitor *v, const char *name,
> + QNull **obj, Error **errp)
> {
> QObjectOutputVisitor *qov = to_qov(v);
> qobject_output_add(qov, name, qnull());
would it be any better to call qobject_output_add(qov, name,
QINCREF(*obj)) here, to ensure we are indeed passing in an appropriate
QNull reference? But your patch is at least self-consistent in stating
we ignore obj in output visitors.
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH for-2.10 04/10] tests/test-qobject-input-visitor: Drop redundant test, (continued)
- [Qemu-devel] [PATCH for-2.10 08/10] migration: Add TODO comments on duplication of QAPI_CLONE(), Markus Armbruster, 2017/07/18
- [Qemu-devel] [PATCH for-2.10 07/10] migration: Clean up around tls_creds, tls_hostname, Markus Armbruster, 2017/07/18
- [Qemu-devel] [PATCH for-2.10 02/10] qapi: Use QNull for a more regular visit_type_null(), Markus Armbruster, 2017/07/18
- [Qemu-devel] [PATCH for-2.10 05/10] block: Use JSON null instead of "" to disable backing file, Markus Armbruster, 2017/07/18
- [Qemu-devel] [PATCH for-2.10 03/10] qapi: Introduce a first class 'null' type, Markus Armbruster, 2017/07/18