[vala/0.34] codegen: Try to use a more unique internal define for properties
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.34] codegen: Try to use a more unique internal define for properties
- Date: Thu, 5 Oct 2017 20:36:06 +0000 (UTC)
commit 27fbc7c5d37cffd3a7a2266929ea30836f2d9755
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Fri Sep 8 14:31:41 2017 +0200
codegen: Try to use a more unique internal define for properties
https://bugzilla.gnome.org/show_bug.cgi?id=787436
codegen/valagobjectmodule.vala | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/codegen/valagobjectmodule.vala b/codegen/valagobjectmodule.vala
index cc14136..0714e1c 100644
--- a/codegen/valagobjectmodule.vala
+++ b/codegen/valagobjectmodule.vala
@@ -141,7 +141,7 @@ public class Vala.GObjectModule : GTypeModule {
var cinst = new CCodeFunctionCall (new CCodeIdentifier
("g_object_class_install_property"));
cinst.add_argument (ccall);
- cinst.add_argument (new CCodeConstant (get_ccode_upper_case_name (prop)));
+ cinst.add_argument (new CCodeConstant ("%s_PROPERTY".printf
(get_ccode_upper_case_name (prop))));
cinst.add_argument (get_param_spec (prop));
ccode.add_expression (cinst);
@@ -214,7 +214,7 @@ public class Vala.GObjectModule : GTypeModule {
cfunc = new CCodeIdentifier (get_ccode_real_name (prop.get_accessor));
}
- ccode.add_case (new CCodeIdentifier (get_ccode_upper_case_name (prop)));
+ ccode.add_case (new CCodeIdentifier ("%s_PROPERTY".printf (get_ccode_upper_case_name
(prop))));
if (prop.property_type.is_real_struct_type ()) {
var st = prop.property_type.data_type as Struct;
@@ -321,7 +321,7 @@ public class Vala.GObjectModule : GTypeModule {
cfunc = new CCodeIdentifier (get_ccode_real_name (prop.set_accessor));
}
- ccode.add_case (new CCodeIdentifier (get_ccode_upper_case_name (prop)));
+ ccode.add_case (new CCodeIdentifier ("%s_PROPERTY".printf (get_ccode_upper_case_name
(prop))));
ccall = new CCodeFunctionCall (cfunc);
ccall.add_argument (cself);
if (prop.property_type is ArrayType &&
((ArrayType)prop.property_type).element_type.data_type == string_type.data_type) {
@@ -670,7 +670,7 @@ public class Vala.GObjectModule : GTypeModule {
base.visit_property (prop);
if (is_gobject_property (prop) && prop.parent_symbol is Class) {
- prop_enum.add_value (new CCodeEnumValue (get_ccode_upper_case_name (prop)));
+ prop_enum.add_value (new CCodeEnumValue ("%s_PROPERTY".printf
(get_ccode_upper_case_name (prop))));
if (prop.initializer != null && prop.set_accessor != null &&
!prop.set_accessor.automatic_body) {
// generate a custom initializer if it couldn't be done at class_init time
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]