[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC 02/21] qapi: Generate up-to-date copyright n
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH RFC 02/21] qapi: Generate up-to-date copyright notice |
Date: |
Fri, 2 Feb 2018 09:47:21 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
On 02/02/2018 07:03 AM, Markus Armbruster wrote:
> Each generator carries a copyright notice for the generator itself,
> and another one for the files it generates. Only the former have been
> updated along the way, the latter have not, and are all out of date.
>
> Fix by copying the generator's copyright notice to the generated files
> instead.
>
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
> +++ b/scripts/qapi-commands.py
> @@ -1,16 +1,17 @@
> -#
> -# QAPI command marshaller generator
> -#
> -# Copyright IBM, Corp. 2011
> -# Copyright (C) 2014-2016 Red Hat, Inc.
> -#
> -# Authors:
> -# Anthony Liguori <address@hidden>
> -# Michael Roth <address@hidden>
> -# Markus Armbruster <address@hidden>
> -#
> -# This work is licensed under the terms of the GNU GPL, version 2.
> -# See the COPYING file in the top-level directory.
> +"""
> +QAPI command marshaller generator
> +
> +Copyright IBM, Corp. 2011
> +Copyright (C) 2014-2018 Red Hat, Inc.
> +
> +Authors:
> + Anthony Liguori <address@hidden>
> + Michael Roth <address@hidden>
> + Markus Armbruster <address@hidden>
> +
> +This work is licensed under the terms of the GNU GPL, version 2.
> +See the COPYING file in the top-level directory.
> +"""
So python lets you start a file with a string constant that is not
associated with any variable name?
>
> (fdef, fdecl) = open_output(output_dir, do_c, do_h, prefix,
> 'qmp-marshal.c', 'qmp-commands.h',
> - blurb)
> + blurb, __doc__)
Ah, and there's what I was missing - python auto-assigns such an initial
string to a magic automatic variable. Cool language feature I hadn't
seen before!
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH RFC 09/21] qapi: Don't absolutize include file name in error messages, (continued)
Re: [Qemu-devel] [PATCH RFC 09/21] qapi: Don't absolutize include file name in error messages, Marc-Andre Lureau, 2018/02/05
[Qemu-devel] [PATCH RFC 15/21] qapi: Record 'include' directives in intermediate representation, Markus Armbruster, 2018/02/02
[Qemu-devel] [PATCH RFC 13/21] qapi: Record 'include' directives in parse tree, Markus Armbruster, 2018/02/02
[Qemu-devel] [PATCH RFC 02/21] qapi: Generate up-to-date copyright notice, Markus Armbruster, 2018/02/02
[Qemu-devel] [PATCH RFC 07/21] qapi: Move parse_command_line() next to its only use, Markus Armbruster, 2018/02/02
[Qemu-devel] [PATCH RFC 19/21] qapi/types: Generate separate .h, .c for each module, Markus Armbruster, 2018/02/02
[Qemu-devel] [PATCH RFC 01/21] qapi: Streamline boilerplate comment generation, Markus Armbruster, 2018/02/02