[vala/staging: 4/4] codegen: Use get_ccode_delegate_target_name() for fields



commit b9e13e39d9ebef287ae511d8f6f320752c1c55d7
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Wed Jun 6 17:22:40 2018 +0200

    codegen: Use get_ccode_delegate_target_name() for fields
    
    Replace get_delegate_target_destroy_notify_cname (get_ccode_name (...))

 codegen/valaccodebasemodule.vala         | 4 ++--
 codegen/valaccodememberaccessmodule.vala | 4 ++--
 codegen/valaccodestructmodule.vala       | 2 +-
 codegen/valagtypemodule.vala             | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 5e5b7e153..192ce92bf 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -1119,7 +1119,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
 
                                if (delegate_type.is_disposable ()) {
                                        cdecl = new CCodeDeclaration (get_ccode_name 
(delegate_target_destroy_type));
-                                       cdecl.add_declarator (new CCodeVariableDeclarator 
(get_delegate_target_destroy_notify_cname  (get_ccode_name (f))));
+                                       cdecl.add_declarator (new CCodeVariableDeclarator 
(get_ccode_delegate_target_destroy_notify_name (f)));
                                        if (f.is_private_symbol ()) {
                                                cdecl.modifiers = CCodeModifiers.STATIC;
                                        } else if (context.hide_internal && f.is_internal_symbol ()) {
@@ -1329,7 +1329,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
 
                                                if (delegate_type.is_disposable ()) {
                                                        var target_destroy_notify_def = new CCodeDeclaration 
(get_ccode_name (delegate_target_destroy_type));
-                                                       target_destroy_notify_def.add_declarator (new 
CCodeVariableDeclarator (get_delegate_target_destroy_notify_cname (get_ccode_name (f)), new CCodeConstant 
("NULL")));
+                                                       target_destroy_notify_def.add_declarator (new 
CCodeVariableDeclarator (get_ccode_delegate_target_destroy_notify_name (f), new CCodeConstant ("NULL")));
                                                        if (!f.is_private_symbol ()) {
                                                                target_destroy_notify_def.modifiers = 
CCodeModifiers.EXTERN;
                                                        } else {
diff --git a/codegen/valaccodememberaccessmodule.vala b/codegen/valaccodememberaccessmodule.vala
index 03a204299..aa3506ca0 100644
--- a/codegen/valaccodememberaccessmodule.vala
+++ b/codegen/valaccodememberaccessmodule.vala
@@ -631,7 +631,7 @@ public abstract class Vala.CCodeMemberAccessModule : CCodeControlFlowModule {
                                }
                        } else if (delegate_type != null && delegate_type.delegate_symbol.has_target && 
get_ccode_delegate_target (field)) {
                                string target_cname = get_ccode_delegate_target_name (field);
-                               string target_destroy_notify_cname = get_delegate_target_destroy_notify_cname 
(get_ccode_name (field));
+                               string target_destroy_notify_cname = 
get_ccode_delegate_target_destroy_notify_name (field);
 
                                if (((TypeSymbol) field.parent_symbol).is_reference_type ()) {
                                        result.delegate_target_cvalue = new CCodeMemberAccess.pointer (inst, 
target_cname);
@@ -698,7 +698,7 @@ public abstract class Vala.CCodeMemberAccessModule : CCodeControlFlowModule {
                        } else if (delegate_type != null && delegate_type.delegate_symbol.has_target && 
get_ccode_delegate_target (field)) {
                                result.delegate_target_cvalue = new CCodeIdentifier 
(get_ccode_delegate_target_name (field));
                                if (result.value_type.is_disposable ()) {
-                                       result.delegate_target_destroy_notify_cvalue = new CCodeIdentifier 
(get_delegate_target_destroy_notify_cname (get_ccode_name (field)));
+                                       result.delegate_target_destroy_notify_cvalue = new CCodeIdentifier 
(get_ccode_delegate_target_destroy_notify_name (field));
                                }
                        }
                }
diff --git a/codegen/valaccodestructmodule.vala b/codegen/valaccodestructmodule.vala
index d5db42951..980fde023 100644
--- a/codegen/valaccodestructmodule.vala
+++ b/codegen/valaccodestructmodule.vala
@@ -107,7 +107,7 @@ public abstract class Vala.CCodeStructModule : CCodeBaseModule {
                                                // create field to store delegate target
                                                instance_struct.add_field (get_ccode_name 
(delegate_target_type), get_ccode_delegate_target_name (f));
                                                if (delegate_type.is_disposable ()) {
-                                                       instance_struct.add_field (get_ccode_name 
(delegate_target_destroy_type), get_delegate_target_destroy_notify_cname (get_ccode_name (f)));
+                                                       instance_struct.add_field (get_ccode_name 
(delegate_target_destroy_type), get_ccode_delegate_target_destroy_notify_name (f));
                                                }
                                        }
                                }
diff --git a/codegen/valagtypemodule.vala b/codegen/valagtypemodule.vala
index 9bb8a3052..1fec5e531 100644
--- a/codegen/valagtypemodule.vala
+++ b/codegen/valagtypemodule.vala
@@ -438,7 +438,7 @@ public class Vala.GTypeModule : GErrorModule {
                                        // create field to store delegate target
                                        instance_struct.add_field (get_ccode_name (delegate_target_type), 
get_ccode_delegate_target_name (f));
                                        if (delegate_type.is_disposable ()) {
-                                               instance_struct.add_field (get_ccode_name 
(delegate_target_destroy_type), get_delegate_target_destroy_notify_cname (get_ccode_name (f)));
+                                               instance_struct.add_field (get_ccode_name 
(delegate_target_destroy_type), get_ccode_delegate_target_destroy_notify_name (f));
                                        }
                                }
                        }
@@ -540,7 +540,7 @@ public class Vala.GTypeModule : GErrorModule {
                                                        // create field to store delegate target
                                                        instance_priv_struct.add_field (get_ccode_name 
(delegate_target_type), get_ccode_delegate_target_name (f));
                                                        if (delegate_type.is_disposable ()) {
-                                                               instance_priv_struct.add_field 
(get_ccode_name (delegate_target_destroy_type), get_delegate_target_destroy_notify_cname (get_ccode_name 
(f)));
+                                                               instance_priv_struct.add_field 
(get_ccode_name (delegate_target_destroy_type), get_ccode_delegate_target_destroy_notify_name (f));
                                                        }
                                                }
                                        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]