From: Eric Blake <eblake@redhat.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: mdroth@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH v8 06/26] qapi-types: Convert to QAPISchemaVisitor, fixing flat unions
Date: Thu, 17 Sep 2015 11:00:50 -0600 [thread overview]
Message-ID: <55FAF1C2.7010401@redhat.com> (raw)
In-Reply-To: <1442401589-24189-7-git-send-email-armbru@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2150 bytes --]
On 09/16/2015 05:06 AM, Markus Armbruster wrote:
> Fixes flat unions to get the base's base members. Test case is from
> commit 2fc0043, in qapi-schema-test.json:
>
> { 'union': 'UserDefFlatUnion',
> 'base': 'UserDefUnionBase',
> 'discriminator': 'enum1',
> 'data': { 'value1' : 'UserDefA',
> 'value2' : 'UserDefB',
> 'value3' : 'UserDefB' } }
>
> { 'struct': 'UserDefUnionBase',
> 'base': 'UserDefZero',
> 'data': { 'string': 'str', 'enum1': 'EnumOne' } }
>
> { 'struct': 'UserDefZero',
> 'data': { 'integer': 'int' } }
>
> Patch's effect on UserDefFlatUnion:
>
> struct UserDefFlatUnion {
> /* Members inherited from UserDefUnionBase: */
> + int64_t integer;
> char *string;
There is another change not listed here. When you were developing with
scaffolding patches, you split the 'typedef struct UserDefFlatUnion {'
into two lines in that patch, and then the diff seen by this patch when
generating the commit message didn't see anything change. But now that
you reverted the scaffolding out of the series, it is now THIS patch
that is converting from inline:
typedef struct UserDefFlatUnion {
...
} UserDefFlatUnion;
to the separate:
typedef struct UserDefFlatUnion;
...
struct UserDefFlatUnion {
...
};
> -def generate_fwd_struct(name):
> +def gen_fwd_object_or_array(name):
> return mcgen('''
>
> typedef struct %(name)s %(name)s;
> -
> -typedef struct %(name)sList {
> - union {
> - %(name)s *value;
> - uint64_t padding;
> - };
> - struct %(name)sList *next;
> -} %(name)sList;
> ''',
> name=c_name(name))
>
> -def generate_fwd_enum_struct(name):
> +def gen_array(name, element_type):
> return mcgen('''
>
> -typedef struct %(name)sList {
> +struct %(name)s {
My R-b still stands, but it would be nice to update this commit message
to reflect that this change was intentional.
--
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 --]
next prev parent reply other threads:[~2015-09-17 17:01 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-16 11:06 [Qemu-devel] [PATCH v8 00/26] qapi: QMP introspection Markus Armbruster
2015-09-16 11:06 ` [Qemu-devel] [PATCH v8 01/26] qapi: Rename class QAPISchema to QAPISchemaParser Markus Armbruster
2015-09-16 11:06 ` [Qemu-devel] [PATCH v8 02/26] qapi: New QAPISchema intermediate reperesentation Markus Armbruster
2015-09-16 14:44 ` Daniel P. Berrange
2015-09-16 15:08 ` Eric Blake
2015-09-17 7:44 ` Markus Armbruster
2015-09-17 15:40 ` Markus Armbruster
2015-09-16 11:06 ` [Qemu-devel] [PATCH v8 03/26] qapi: QAPISchema code generation helper methods Markus Armbruster
2015-09-16 14:51 ` Daniel P. Berrange
2015-09-16 15:11 ` Eric Blake
2015-09-16 11:06 ` [Qemu-devel] [PATCH v8 04/26] qapi: New QAPISchemaVisitor Markus Armbruster
2015-09-16 14:51 ` Daniel P. Berrange
2015-09-16 15:21 ` Eric Blake
2015-09-17 7:46 ` Markus Armbruster
2015-09-16 11:06 ` [Qemu-devel] [PATCH v8 05/26] tests/qapi-schema: Convert test harness to QAPISchemaVisitor Markus Armbruster
2015-09-16 14:53 ` Daniel P. Berrange
2015-09-16 15:27 ` Eric Blake
2015-09-17 7:49 ` Markus Armbruster
2015-09-16 11:06 ` [Qemu-devel] [PATCH v8 06/26] qapi-types: Convert to QAPISchemaVisitor, fixing flat unions Markus Armbruster
2015-09-16 14:54 ` Daniel P. Berrange
2015-09-16 17:09 ` Eric Blake
2015-09-17 17:00 ` Eric Blake [this message]
2015-09-18 6:54 ` Markus Armbruster
2015-09-16 11:06 ` [Qemu-devel] [PATCH v8 07/26] qapi-visit: Convert to QAPISchemaVisitor, fixing bugs Markus Armbruster
2015-09-16 14:54 ` Daniel P. Berrange
2015-09-16 17:10 ` Eric Blake
2015-09-16 11:06 ` [Qemu-devel] [PATCH v8 08/26] qapi-commands: Convert to QAPISchemaVisitor Markus Armbruster
2015-09-16 14:57 ` Daniel P. Berrange
2015-09-16 11:06 ` [Qemu-devel] [PATCH v8 09/26] qapi: De-duplicate enum code generation Markus Armbruster
2015-09-16 14:58 ` Daniel P. Berrange
2015-09-16 17:16 ` Eric Blake
2015-09-17 8:04 ` Markus Armbruster
2015-09-16 11:06 ` [Qemu-devel] [PATCH v8 10/26] qapi-event: Eliminate global variable event_enum_value Markus Armbruster
2015-09-16 11:06 ` [Qemu-devel] [PATCH v8 11/26] qapi-event: Convert to QAPISchemaVisitor, fixing data with base Markus Armbruster
2015-09-16 14:59 ` Daniel P. Berrange
2015-09-16 11:06 ` [Qemu-devel] [PATCH v8 12/26] qapi: Replace dirty is_c_ptr() by method c_null() Markus Armbruster
2015-09-16 11:06 ` [Qemu-devel] [PATCH v8 13/26] qapi: Clean up after recent conversions to QAPISchemaVisitor Markus Armbruster
2015-09-16 15:00 ` Daniel P. Berrange
2015-09-16 17:20 ` Eric Blake
2015-09-16 11:06 ` [Qemu-devel] [PATCH v8 14/26] qapi-visit: Rearrange code a bit Markus Armbruster
2015-09-16 11:06 ` [Qemu-devel] [PATCH v8 15/26] qapi-commands: Rearrange code Markus Armbruster
2015-09-16 11:06 ` [Qemu-devel] [PATCH v8 16/26] qapi: Rename qmp_marshal_input_FOO() to qmp_marshal_FOO() Markus Armbruster
2015-09-16 11:06 ` [Qemu-devel] [PATCH v8 17/26] qapi: De-duplicate parameter list generation Markus Armbruster
2015-09-16 11:06 ` [Qemu-devel] [PATCH v8 18/26] qapi-commands: De-duplicate output marshaling functions Markus Armbruster
2015-09-16 11:06 ` [Qemu-devel] [PATCH v8 19/26] qapi: Improve built-in type documentation Markus Armbruster
2015-09-16 11:06 ` [Qemu-devel] [PATCH v8 20/26] qapi: Make output visitor return qnull() instead of NULL Markus Armbruster
2015-09-16 11:06 ` [Qemu-devel] [PATCH v8 21/26] qapi: Introduce a first class 'any' type Markus Armbruster
2015-09-16 11:06 ` [Qemu-devel] [PATCH v8 22/26] qom: Don't use 'gen': false for qom-get, qom-set, object-add Markus Armbruster
2015-09-16 11:06 ` [Qemu-devel] [PATCH v8 23/26] qapi-schema: Fix up misleading specification of netdev_add Markus Armbruster
2015-09-16 11:06 ` [Qemu-devel] [PATCH v8 24/26] qapi: Pseudo-type '**' is now unused, drop it Markus Armbruster
2015-09-16 11:06 ` [Qemu-devel] [PATCH v8 25/26] qapi: New QMP command query-qmp-schema for QMP introspection Markus Armbruster
2015-09-16 20:08 ` Eric Blake
2015-09-16 11:06 ` [Qemu-devel] [PATCH v8 26/26] qapi-introspect: Hide type names Markus Armbruster
2015-09-16 15:07 ` [Qemu-devel] [PATCH v8 00/26] qapi: QMP introspection Daniel P. Berrange
2015-09-17 16:16 ` 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=55FAF1C2.7010401@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=mdroth@linux.vnet.ibm.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).