From: Evan Nemerson Date: Thu, 6 May 2010 04:55:30 +0000 (-0700) Subject: Never mark *_register_type functions as static X-Git-Tag: 0.9.1~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=35160c865ffa47a2c1958cb682b0c38406d240e5;p=thirdparty%2Fvala.git 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. --- diff --git a/codegen/valatyperegisterfunction.vala b/codegen/valatyperegisterfunction.vala index 5cf9fba53..7ce72052b 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 ());