[Spice-devel] [PATCH 3/2] marshaller: Use #include <> for headers in $srcdir/common

Christophe Fergeau cfergeau at redhat.com
Wed Apr 2 02:27:42 PDT 2014


Ping ?

On Tue, Mar 25, 2014 at 04:40:14PM +0100, Christophe Fergeau wrote:
> Since the (de)marshallers are now generated in $builddir and not in
> $srcdir, when these generated files include a file located in
> $srcdir/common, the compiler will find them thanks to a -I directive, so it
> makes more sense to use <> rather than "" when including them.
> ---
> Hey,
> 
> I finally got what you meant in this review comment, and this should be
> addessed by this additional patch
> 
> Christophe
> 
>  python_modules/demarshal.py | 2 +-
>  spice_codegen.py            | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/python_modules/demarshal.py b/python_modules/demarshal.py
> index 794cd25..b7e51dc 100644
> --- a/python_modules/demarshal.py
> +++ b/python_modules/demarshal.py
> @@ -1250,7 +1250,7 @@ def write_includes(writer):
>      writer.writeln("#include <stdio.h>")
>      writer.writeln("#include <spice/protocol.h>")
>      writer.writeln("#include <spice/macros.h>")
> -    writer.writeln('#include "common/mem.h"')
> +    writer.writeln('#include <common/mem.h>')
>      writer.newline()
>      writer.writeln("#ifdef _MSC_VER")
>      writer.writeln("#pragma warning(disable:4101)")
> diff --git a/spice_codegen.py b/spice_codegen.py
> index d35d949..c8376cc 100755
> --- a/spice_codegen.py
> +++ b/spice_codegen.py
> @@ -209,8 +209,8 @@ if options.print_error:
>  
>  if options.includes:
>      for i in options.includes:
> -        writer.header.writeln('#include "%s"' % i)
> -        writer.writeln('#include "%s"' % i)
> +        writer.header.writeln('#include <%s>' % i)
> +        writer.writeln('#include <%s>' % i)
>  
>  if options.generate_enums or options.generate_dissector:
>      write_enums(writer, options.generate_dissector)
> -- 
> 1.8.5.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20140402/c38b41a7/attachment.sig>


More information about the Spice-devel mailing list