vala r1976 - in trunk: . gobject
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1976 - in trunk: . gobject
- Date: Tue, 4 Nov 2008 17:22:40 +0000 (UTC)
Author: juergbi
Date: Tue Nov 4 17:22:40 2008
New Revision: 1976
URL: http://svn.gnome.org/viewvc/vala?rev=1976&view=rev
Log:
2008-11-04 JÃrg Billeter <j bitron ch>
* gobject/valaccodebasemodule.vala:
* gobject/valagobjectmodule.vala:
Move construct property assignment to GObjectModule
Modified:
trunk/ChangeLog
trunk/gobject/valaccodebasemodule.vala
trunk/gobject/valagobjectmodule.vala
Modified: trunk/gobject/valaccodebasemodule.vala
==============================================================================
--- trunk/gobject/valaccodebasemodule.vala (original)
+++ trunk/gobject/valaccodebasemodule.vala Tue Nov 4 17:22:40 2008
@@ -213,36 +213,6 @@
}
}
- public override CCodeExpression get_construct_property_assignment (CCodeConstant canonical_cconstant, DataType property_type, CCodeExpression value) {
- // this property is used as a construction parameter
- var cpointer = new CCodeIdentifier ("__params_it");
-
- var ccomma = new CCodeCommaExpression ();
- // set name in array for current parameter
- var cnamemember = new CCodeMemberAccess.pointer (cpointer, "name");
- var cnameassign = new CCodeAssignment (cnamemember, canonical_cconstant);
- ccomma.append_expression (cnameassign);
-
- var gvaluearg = new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, new CCodeMemberAccess.pointer (cpointer, "value"));
-
- // initialize GValue in array for current parameter
- var cvalueinit = new CCodeFunctionCall (new CCodeIdentifier ("g_value_init"));
- cvalueinit.add_argument (gvaluearg);
- cvalueinit.add_argument (new CCodeIdentifier (property_type.get_type_id ()));
- ccomma.append_expression (cvalueinit);
-
- // set GValue for current parameter
- var cvalueset = new CCodeFunctionCall (get_value_setter_function (property_type));
- cvalueset.add_argument (gvaluearg);
- cvalueset.add_argument (value);
- ccomma.append_expression (cvalueset);
-
- // move pointer to next parameter in array
- ccomma.append_expression (new CCodeUnaryExpression (CCodeUnaryOperator.POSTFIX_INCREMENT, cpointer));
-
- return ccomma;
- }
-
private CCodeIncludeDirective get_internal_include (string filename) {
return new CCodeIncludeDirective (filename, context.library == null);
}
Modified: trunk/gobject/valagobjectmodule.vala
==============================================================================
--- trunk/gobject/valagobjectmodule.vala (original)
+++ trunk/gobject/valagobjectmodule.vala Tue Nov 4 17:22:40 2008
@@ -1453,5 +1453,35 @@
return cspec;
}
+
+ public override CCodeExpression get_construct_property_assignment (CCodeConstant canonical_cconstant, DataType property_type, CCodeExpression value) {
+ // this property is used as a construction parameter
+ var cpointer = new CCodeIdentifier ("__params_it");
+
+ var ccomma = new CCodeCommaExpression ();
+ // set name in array for current parameter
+ var cnamemember = new CCodeMemberAccess.pointer (cpointer, "name");
+ var cnameassign = new CCodeAssignment (cnamemember, canonical_cconstant);
+ ccomma.append_expression (cnameassign);
+
+ var gvaluearg = new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, new CCodeMemberAccess.pointer (cpointer, "value"));
+
+ // initialize GValue in array for current parameter
+ var cvalueinit = new CCodeFunctionCall (new CCodeIdentifier ("g_value_init"));
+ cvalueinit.add_argument (gvaluearg);
+ cvalueinit.add_argument (new CCodeIdentifier (property_type.get_type_id ()));
+ ccomma.append_expression (cvalueinit);
+
+ // set GValue for current parameter
+ var cvalueset = new CCodeFunctionCall (get_value_setter_function (property_type));
+ cvalueset.add_argument (gvaluearg);
+ cvalueset.add_argument (value);
+ ccomma.append_expression (cvalueset);
+
+ // move pointer to next parameter in array
+ ccomma.append_expression (new CCodeUnaryExpression (CCodeUnaryOperator.POSTFIX_INCREMENT, cpointer));
+
+ return ccomma;
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]