On Fri, Sep 21, 2018 at 09:50:35AM -0400, Frediano Ziglio wrote: > > > > Shorten the generated dissector, drop unused config.h inclusion and > > abbreviate the license blurb. No functional change, cosmetics only. > > > > Signed-off-by: Peter Wu <peter@xxxxxxxxxxxxx> > > I'm fine with the config.h, the license I would retain the full version Wireshark uses the shorter SPDX identifiers to reduce boilerplate, this convention is also being adopted by other projects (such as the Linux kernel). See https://spdx.org/ids If Wireshark is the intended consumer for the generated output, then I would recommend using the shorter SPDX output. Otherwise we would have to manually modify the output which is not ideal. Kind regards, Peter > Frediano > > > --- > > For the updated output, see https://code.wireshark.org/review/29380 > > I considered capitalizing names such as SPICE_VSC_MESSAGE_TYPE_FLUSHCOMPLETE > > (instead of SPICE_VSC_MESSAGE_TYPE_FlushComplete), but that breaks the public > > spice-protocol interface which has been there since at least 2010, so nope. > > --- > > spice_codegen.py | 12 ++++++++++-- > > 1 file changed, 10 insertions(+), 2 deletions(-) > > > > diff --git a/spice_codegen.py b/spice_codegen.py > > index 76d7c5e..d791064 100755 > > --- a/spice_codegen.py > > +++ b/spice_codegen.py > > @@ -176,7 +176,15 @@ writer.header.set_option("dest_file", dest_file) > > writer.set_option("source", os.path.basename(proto_file)) > > > > if options.license == "LGPL": > > - license = """/* > > + if options.generate_dissector: > > + license = """/* > > + * Copyright (C) 2013 Red Hat, Inc. > > + * SPDX-License-Identifier: LGPL-2.1-or-later > > + */ > > + > > +""" > > + else: > > + license = """/* > > Copyright (C) 2013 Red Hat, Inc. > > > > This library is free software; you can redistribute it and/or > > @@ -236,7 +244,7 @@ writer.writeln("/* this is a file autogenerated by > > spice_codegen.py */") > > writer.write(license) > > writer.header.writeln("/* this is a file autogenerated by spice_codegen.py > > */") > > writer.header.write(license) > > -if not options.header and not options.generate_enums: > > +if not (options.header or options.generate_enums or > > options.generate_dissector): > > writer.writeln("#ifdef HAVE_CONFIG_H") > > writer.writeln("#include <config.h>") > > writer.writeln("#endif") _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel