From: Richard Pospesel Subject: [PATCH 05/15] widl: add type_function_get_retdeclspec function Message-Id: <20190705215144.7474-4-richard@torproject.org> Date: Fri, 5 Jul 2019 14:51:34 -0700 In-Reply-To: <20190705215144.7474-3-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> Signed-off-by: Richard Pospesel --- tools/widl/typetree.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/widl/typetree.h b/tools/widl/typetree.h index 1fd86bbc89..c773ddd116 100644 --- a/tools/widl/typetree.h +++ b/tools/widl/typetree.h @@ -129,9 +129,14 @@ static inline var_t *type_function_get_retval(const type_t *type) return type->details.function->retval; } +static inline const decl_spec_t *type_function_get_retdeclspec(const type_t *type) +{ + return &type_function_get_retval(type)->declspec; +} + static inline type_t *type_function_get_rettype(const type_t *type) { - return type_function_get_retval(type)->declspec.type; + return type_function_get_retdeclspec(type)->type; } static inline var_list_t *type_enum_get_values(const type_t *type) -- 2.17.1