]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Never mark *_register_type functions as static
authorEvan Nemerson <evan@coeus-group.com>
Thu, 6 May 2010 04:55:30 +0000 (21:55 -0700)
committerJürg Billeter <j@bitron.ch>
Mon, 7 Jun 2010 19:05:58 +0000 (21:05 +0200)
*_register_type functions are called by the module init function,
which might reside in a different file.

Fixes bug 617850.

codegen/valatyperegisterfunction.vala

index 5cf9fba53863aa78eab65dddada56b6debd8c4db..7ce72052b4823084ac9f09a0e70e4b0fe1609a2b 100644 (file)
@@ -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 ());