qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH 02/10] Fix errors and warnings while compili


From: Luiz Capitulino
Subject: Re: [Qemu-devel] [RFC PATCH 02/10] Fix errors and warnings while compiling with c++ compilier
Date: Thu, 14 Feb 2013 10:27:47 -0200

On Thu, 14 Feb 2013 15:10:36 +0900
Tomoki Sekiyama <address@hidden> wrote:

> Rename 'class' member in class_info of PciDeviceInfo to 'dev_class', and
> add some casts to avoid errors from c++ compiler.

[...]

>  #
>  # @class_info.desc: #optional a string description of the device's class
>  #
> -# @class_info.class: the class code of the device
> +# @class_info.dev_class: the class code of the device
>  #
>  # @id.device: the PCI device id
>  #
> @@ -1171,7 +1171,7 @@
>  ##
>  { 'type': 'PciDeviceInfo',
>    'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
> -           'class_info': {'*desc': 'str', 'class': 'int'},
> +           'class_info': {'*desc': 'str', 'dev_class': 'int'},
>             'id': {'device': 'int', 'vendor': 'int'},
>             '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
>             'regions': ['PciMemoryRegion']} }

The right way of doing this is to add 'class' to the set of reserved
words in scripts/qapi.py:c_var(). Then you'll have to adapt the code to
use the 'q_' prefix.

Now, is using C++ required? Why can't you use plain C?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]