qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH RFC v2 03/47] qapi: Simplify guardname()


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH RFC v2 03/47] qapi: Simplify guardname()
Date: Mon, 20 Jul 2015 11:32:31 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

On 07/01/2015 02:21 PM, Markus Armbruster wrote:
> The guards around built-in declarations lose their _H.  It never made
> much sense anyway.

Correct - the _H tail on the guard for the overall file makes sense
(when the overall file ends in .h), but for an unrelated use in the
middle of the file, it has no bearing on any file name and does not need
a _H tail.

> 
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
>  scripts/qapi.py | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)

Reviewed-by: Eric Blake <address@hidden>

For an example of what it changes, qapi-types.h sees changes like this
(while the original #ifndef QAPI_TYPES_H guard at the front of the file
remains unchanged, which is good):

--- qapi-types.h.old    2015-07-20 10:40:19.513650697 -0600
+++ qapi-types.h        2015-07-20 11:27:15.481152848 -0600
@@ -20,8 +20,8 @@
 #include <stdint.h>


-#ifndef QAPI_TYPES_BUILTIN_STRUCT_DECL_H
-#define QAPI_TYPES_BUILTIN_STRUCT_DECL_H
+#ifndef QAPI_TYPES_BUILTIN_STRUCT_DECL
+#define QAPI_TYPES_BUILTIN_STRUCT_DECL


 typedef struct int32List
@@ -141,7 +141,7 @@
     struct uint32List *next;
 } uint32List;

-#endif /* QAPI_TYPES_BUILTIN_STRUCT_DECL_H */
+#endif /* QAPI_TYPES_BUILTIN_STRUCT_DECL */


 extern const char * const ErrorClass_lookup[];
...

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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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