[vala] Never mark *_register_type functions as static



commit 35160c865ffa47a2c1958cb682b0c38406d240e5
Author: Evan Nemerson <evan coeus-group com>
Date:   Wed May 5 21:55:30 2010 -0700

    Never mark *_register_type functions as static
    
    *_register_type functions are called by the module init function,
    which might reside in a different file.
    
    Fixes bug 617850.

 codegen/valatyperegisterfunction.vala |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
---
diff --git a/codegen/valatyperegisterfunction.vala b/codegen/valatyperegisterfunction.vala
index 5cf9fba..7ce7205 100644
--- a/codegen/valatyperegisterfunction.vala
+++ b/codegen/valatyperegisterfunction.vala
@@ -79,11 +79,6 @@ public abstract class Vala.TypeRegisterFunction {
 			fun.add_parameter (new CCodeFormalParameter ("module", "GTypeModule *"));
 
 			var get_fun = new CCodeFunction ("%s_get_type".printf (get_type_declaration ().get_lower_case_cname (null)), "GType");
-			if (get_accessibility () == SymbolAccessibility.PRIVATE) {
-				fun.modifiers = CCodeModifiers.STATIC;
-				// avoid C warning as this function is not always used
-				fun.attributes = "G_GNUC_UNUSED";
-			}
 
 			declaration_fragment.append (get_fun.copy ());
 



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