Missing declarations of called C functions in [ModuleInit] function
The budgie-menu
panel applet contains this code:
[ModuleInit]
public void peas_register_types(TypeModule module) {
// boilerplate - all modules need this
var objmodule = module as Peas.ObjectModule;
objmodule.register_extension_type(typeof(Budgie.Plugin), typeof(BudgieMenu));
}
For some reason, this gets translated into this C code:
void
peas_register_types (GTypeModule* module)
{
PeasObjectModule* objmodule = NULL;
PeasObjectModule* _tmp0_;
g_return_if_fail (module != NULL);
budgie_menu_register_type (module);
budgie_menu_settings_register_type (module);
budgie_menu_applet_register_type (module);
category_button_register_type (module);
menu_button_register_type (module);
budgie_menu_window_register_type (module);
icon_chooser_register_type (module);
overlay_menus_register_type (module);
user_button_register_type (module);
menu_item_register_type (module);
application_view_register_type (module);
application_list_view_register_type (module);
accounts_remote_register_type (module);
accounts_remote_proxy_register_dynamic_type (module);
account_user_remote_register_type (module);
account_user_remote_proxy_register_dynamic_type (module);
properties_remote_register_type (module);
properties_remote_proxy_register_dynamic_type (module);
power_dialog_remote_register_type (module);
power_dialog_remote_proxy_register_dynamic_type (module);
xdg_dir_tracker_remote_register_type (module);
xdg_dir_tracker_remote_proxy_register_dynamic_type (module);
_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (module, peas_object_module_get_type ()) ? ((PeasObjectModule*) module) : NULL);
objmodule = _tmp0_;
peas_object_module_register_extension_type (objmodule, budgie_plugin_get_type (), TYPE_BUDGIE_MENU);
_g_object_unref0 (objmodule);
}
(For brevity, I removed the #line
directives.) Compilation fails with modern compilers because several of these functions are not declared at the point of call. This affects accounts_remote_proxy_register_dynamic_type
, account_user_remote_proxy_register_dynamic_type
, properties_remote_proxy_register_dynamic_type
, power_dialog_remote_proxy_register_dynamic_type
. It is not clear to my why the Vala compiler is emitting those calls to undeclared functions.
This is with vala vala-0.56.4-1.fc39.x86_64 from current Fedora rawhide.