[vala/0.40] codegen: Add prototype for *_register_type() function
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.40] codegen: Add prototype for *_register_type() function
- Date: Mon, 5 Nov 2018 08:13:18 +0000 (UTC)
commit 5acf211f0ea5dddd0d21d98d8b27b07a805ec070
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sun Nov 4 20:22:22 2018 +0100
codegen: Add prototype for *_register_type() function
Found with -Werror=missing-prototypes
codegen/valatyperegisterfunction.vala | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/codegen/valatyperegisterfunction.vala b/codegen/valatyperegisterfunction.vala
index 1580c9e8c..f4ee3736b 100644
--- a/codegen/valatyperegisterfunction.vala
+++ b/codegen/valatyperegisterfunction.vala
@@ -84,6 +84,10 @@ public abstract class Vala.TypeRegisterFunction {
fun = new CCodeFunction ("%s_register_type".printf (get_ccode_lower_case_name
(get_type_declaration ())), "GType");
fun.add_parameter (new CCodeParameter ("module", "GTypeModule *"));
+ fun.is_declaration = true;
+ declaration_fragment.append (fun.copy ());
+ fun.is_declaration = false;
+
var get_fun = new CCodeFunction ("%s_get_type".printf (get_ccode_lower_case_name
(get_type_declaration ())), "GType");
get_fun.modifiers = CCodeModifiers.CONST;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]