Commit 87a28817 authored by Rico Tzschichholz's avatar Rico Tzschichholz

libvaladoc: Clean up Api.Struct constructor

parent 0c151d72
......@@ -35,21 +35,24 @@ public class Valadoc.Api.Struct : TypeSymbol {
private string? cname;
public Struct (Node parent, SourceFile file, string name, Vala.SymbolAccessibility accessibility,
SourceComment? comment, string? cname, string? type_macro_name,
string? type_function_name, string? type_id, string? dup_function_cname,
string? copy_function_cname, string? destroy_function_cname,
string? free_function_cname, bool is_basic_type, Vala.Struct data)
SourceComment? comment, string? type_macro_name,
string? type_function_name, Vala.Struct data)
{
bool is_basic_type = data.base_type == null
&& (data.is_boolean_type ()
|| data.is_floating_type ()
|| data.is_integer_type ());
base (parent, file, name, accessibility, comment, type_macro_name, null, null,
type_function_name, is_basic_type, data);
this.dup_function_cname = dup_function_cname;
this.copy_function_cname = copy_function_cname;
this.free_function_cname = free_function_cname;
this.destroy_function_cname = destroy_function_cname;
this.dup_function_cname = Vala.get_ccode_dup_function (data);
this.copy_function_cname = Vala.get_ccode_copy_function (data);
this.free_function_cname = Vala.get_ccode_free_function (data);
this.destroy_function_cname = Vala.get_ccode_destroy_function (data);
this.cname = cname;
this.type_id = type_id;
this.cname = Vala.get_ccode_name (data);
this.type_id = Vala.get_ccode_type_id (data);
}
/**
......
......@@ -716,25 +716,13 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
SourceFile? file = get_source_file (element);
SourceComment? comment = create_comment (element.comment);
bool is_basic_type = element.base_type == null
&& (element.is_boolean_type ()
|| element.is_floating_type ()
|| element.is_integer_type ());
Struct node = new Struct (parent,
file,
element.name,
element.access,
comment,
Vala.get_ccode_name (element),
get_type_macro_name (element),
get_type_function_name (element),
Vala.get_ccode_type_id (element),
Vala.get_ccode_dup_function (element),
Vala.get_ccode_copy_function (element),
Vala.get_ccode_destroy_function (element),
Vala.get_ccode_free_function (element),
is_basic_type,
element);
symbol_map.set (element, node);
parent.add_child (node);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment