// default profile
context.profile = Profile.GOBJECT;
context.add_define ("GOBJECT");
+ context.add_define ("VALA_0_7_6_NEW_METHODS");
} else {
Report.error (null, "Unknown profile %s".printf (profile));
}
if (m is CreationMethod) {
if (m.name == null) {
default_construction_method = m;
- m.name = "new";
+ m.name = ".new";
}
var cm = (CreationMethod) m;
if (m is CreationMethod) {
var datatype = (TypeSymbol) m.parent_symbol;
write_identifier (datatype.name);
- if (m.name != "new") {
+ if (m.name != ".new") {
write_string (".");
write_identifier (m.name);
}
infix = "init";
}
- if (name == "new") {
+ 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);
string infix = "construct";
- if (name == "new") {
+ 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);
if (m is CreationMethod) {
if (m.name == null) {
default_construction_method = m;
- m.name = "new";
+ m.name = ".new";
}
var cm = (CreationMethod) m;
public class Object {
public uint ref_count;
+ [CCode (has_construct_function = false)]
+ public Object (Type type = typeof (Object), ...);
+
+#if VALA_0_7_6_NEW_METHODS
public static Object @new (Type type, ...);
+#endif
[CCode (cname = "G_TYPE_FROM_INSTANCE")]
public Type get_type ();