[vala/0.36] codegen: Add prototype for *_register_type() function
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.36] codegen: Add prototype for *_register_type() function
- Date: Mon, 5 Nov 2018 08:27:04 +0000 (UTC)
commit 0f2b09a6637151d1c27375a82153755070f4e08e
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 dbfe923f6..9386e99c6 100644
--- a/codegen/valatyperegisterfunction.vala
+++ b/codegen/valatyperegisterfunction.vala
@@ -86,6 +86,10 @@ public abstract class Vala.TypeRegisterFunction {
fun = new CCodeFunction ("%s_register_type".printf
(CCodeBaseModule.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
(CCodeBaseModule.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]