From 086ee7a6200fa5ad795b12110b5b3d5a93dcac3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 1 Jun 2017 16:41:41 +0400 Subject: scripts: use build_ prefix for string not piped through cgen() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The gen_ prefix is awkward. Generated C should go through cgen() exactly once (see commit 1f9a7a1). The common way to get this wrong is passing a foo=gen_foo() keyword argument to mcgen(). I'd like us to adopt a naming convention where gen_ means "something that's been piped through cgen(), and thus must not be passed to cgen() or mcgen()". Requires renaming gen_params(), gen_marshal_proto() and gen_event_send_proto(). Suggested-by: Markus Armbruster Signed-off-by: Marc-André Lureau Message-Id: <20170601124143.10915-1-marcandre.lureau@redhat.com> Reviewed-by: Eric Blake Signed-off-by: Markus Armbruster --- scripts/qapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/qapi.py') diff --git a/scripts/qapi.py b/scripts/qapi.py index 0de809f56b..84e2eb441b 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -1897,7 +1897,7 @@ extern const char *const %(c_name)s_lookup[]; return ret -def gen_params(arg_type, boxed, extra): +def build_params(arg_type, boxed, extra): if not arg_type: assert not boxed return extra -- cgit v1.2.3