From: Richard Pospesel Subject: [PATCH 11/15] widl: take FUNCTION_SPECIFIER_INLINE into account when writing client function declarations and function prototypes to match midl.exe output Message-Id: <20190705215144.7474-10-richard@torproject.org> Date: Fri, 5 Jul 2019 14:51:40 -0700 In-Reply-To: <20190705215144.7474-9-richard@torproject.org> References: <20190705215003.7384-1-richard@torproject.org> <20190705215144.7474-1-richard@torproject.org> <20190705215144.7474-2-richard@torproject.org> <20190705215144.7474-3-richard@torproject.org> <20190705215144.7474-4-richard@torproject.org> <20190705215144.7474-5-richard@torproject.org> <20190705215144.7474-6-richard@torproject.org> <20190705215144.7474-7-richard@torproject.org> <20190705215144.7474-8-richard@torproject.org> <20190705215144.7474-9-richard@torproject.org> Signed-off-by: Richard Pospesel --- tools/widl/client.c | 1 + tools/widl/header.c | 1 + 2 files changed, 2 insertions(+) diff --git a/tools/widl/client.c b/tools/widl/client.c index 9a15153bab..93a7f36e4b 100644 --- a/tools/widl/client.c +++ b/tools/widl/client.c @@ -58,6 +58,7 @@ static void write_client_func_decl( const type_t *iface, const var_t *func ) if (!callconv) callconv = "__cdecl"; write_declspec_decl_left(client, retdeclspec); + if (func->declspec.funcspecifier == FUNCTION_SPECIFIER_INLINE) fprintf(client, " inline"); fprintf(client, " %s ", callconv); fprintf(client, "%s%s(\n", prefix_client, get_name(func)); indent++; diff --git a/tools/widl/header.c b/tools/widl/header.c index f58ad19927..5ccc9f8b66 100644 --- a/tools/widl/header.c +++ b/tools/widl/header.c @@ -1418,6 +1418,7 @@ static void write_function_proto(FILE *header, const type_t *iface, const var_t if (!callconv) callconv = "__cdecl"; /* FIXME: do we need to handle call_as? */ write_declspec_decl_left(header, type_function_get_retdeclspec(fun->declspec.type)); + if (fun->declspec.funcspecifier == FUNCTION_SPECIFIER_INLINE) fprintf(header, " inline"); fprintf(header, " %s ", callconv); fprintf(header, "%s%s(\n", prefix, get_name(fun)); if (type_function_get_args(fun->declspec.type)) -- 2.17.1