[vala/staging: 3/4] codegen: Add prototype for *_register_type() function
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging: 3/4] codegen: Add prototype for *_register_type() function
- Date: Sun, 4 Nov 2018 21:57:33 +0000 (UTC)
commit 5a06432d675ba9d9d1b08ad5568317b5222d8fd9
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 c0ceecd9d..c4c860624 100644
--- a/codegen/valatyperegisterfunction.vala
+++ b/codegen/valatyperegisterfunction.vala
@@ -85,6 +85,10 @@ public abstract class Vala.TypeRegisterFunction {
fun = new CCodeFunction ("%s_register_type".printf (get_ccode_lower_case_name
(type_symbol)), "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
(type_symbol)), "GType");
get_fun.modifiers = CCodeModifiers.CONST;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]