summaryrefslogtreecommitdiff
path: root/vala/valacreationmethod.vala
diff options
context:
space:
mode:
Diffstat (limited to 'vala/valacreationmethod.vala')
-rw-r--r--vala/valacreationmethod.vala60
1 files changed, 0 insertions, 60 deletions
diff --git a/vala/valacreationmethod.vala b/vala/valacreationmethod.vala
index 7ece293ca..826a0db90 100644
--- a/vala/valacreationmethod.vala
+++ b/vala/valacreationmethod.vala
@@ -49,9 +49,6 @@ public class Vala.CreationMethod : Method {
public CreationMethod (string? class_name, string? name, SourceReference? source_reference = null, Comment? comment = null) {
base (name, new VoidType (), source_reference, comment);
this.class_name = class_name;
-
- carray_length_parameter_position = -3;
- cdelegate_target_parameter_position = -3;
}
public override void accept (CodeVisitor visitor) {
@@ -80,61 +77,6 @@ public class Vala.CreationMethod : Method {
}
}
- public override string get_default_cname () {
- var parent = parent_symbol as TypeSymbol;
-
- string infix = "new";
- var st = parent as Struct;
- if (st != null) {
- if (CodeContext.get ().profile == Profile.DOVA) {
- if (st.is_boolean_type () || st.is_integer_type () || st.is_floating_type ()) {
- // don't use any infix for basic types
- if (name == ".new") {
- return parent.get_lower_case_cname ();
- } else {
- return "%s%s".printf (parent.get_lower_case_cprefix (), name);
- }
- }
- }
- infix = "init";
- }
-
- if (name == ".new") {
- return "%s%s".printf (parent.get_lower_case_cprefix (), infix);
- } else {
- return "%s%s_%s".printf (parent.get_lower_case_cprefix (), infix, name);
- }
- }
-
- public override string get_real_cname () {
- var ccode_attribute = get_attribute ("CCode");
- if (ccode_attribute != null && ccode_attribute.has_argument ("construct_function")) {
- return ccode_attribute.get_string ("construct_function");
- }
-
- return get_default_construct_function ();
- }
-
- public string get_default_construct_function () {
- var parent = parent_symbol as Class;
-
- if (parent == null || parent.is_compact) {
- return get_cname ();
- }
-
- string infix = "construct";
-
- if (CodeContext.get ().profile == Profile.DOVA) {
- infix = "init";
- }
-
- if (name == ".new") {
- return "%s%s".printf (parent.get_lower_case_cprefix (), infix);
- } else {
- return "%s%s_%s".printf (parent.get_lower_case_cprefix (), infix, name);
- }
- }
-
public override bool check (CodeContext context) {
if (checked) {
return !error;
@@ -142,8 +84,6 @@ public class Vala.CreationMethod : Method {
checked = true;
- process_attributes ();
-
if (class_name != null && class_name != parent_symbol.name) {
// class_name is null for constructors generated by GIdlParser
Report.error (source_reference, "missing return type in method `%s.%s´".printf (context.analyzer.current_symbol.get_full_name (), class_name));