X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=type_t.h;h=715db40785854d75a532ccde55cb41388556ff12;hb=6c785d56ed010a3a1a5b8cffe3cc7c8394f69590;hp=a45997d1752b33f5574f663f9b3de4d7cf380b9d;hpb=6dc5b6251ac0d183a62021b991d17d2debd603eb;p=cparser diff --git a/type_t.h b/type_t.h index a45997d..715db40 100644 --- a/type_t.h +++ b/type_t.h @@ -105,7 +105,7 @@ struct function_parameter_t { struct function_type_t { type_base_t type; - type_t *result_type; + type_t *return_type; function_parameter_t *parameters; unsigned variadic : 1; unsigned unspecified_parameters : 1; @@ -181,6 +181,18 @@ static inline bool is_type_pointer(const type_t *type) return type->type == TYPE_POINTER; } +static inline bool is_type_array(const type_t *type) +{ + assert(!is_typeref(type)); + return type->type == TYPE_ARRAY; +} + +static inline bool is_type_function(const type_t *type) +{ + assert(!is_typeref(type)); + return type->type == TYPE_FUNCTION; +} + static inline bool is_type_compound(const type_t *type) { assert(!is_typeref(type));