summaryrefslogtreecommitdiff
path: root/codegen/valagdbusclientmodule.vala
diff options
context:
space:
mode:
authorPrinceton Ferro <princetonferro@gmail.com>2021-05-09 16:00:11 -0400
committerRico Tzschichholz <ricotz@ubuntu.com>2021-05-20 11:59:28 +0200
commitd6f555908157783a309d049405ebe6b676e2b499 (patch)
treee823f754bafa982e37449509da37d4d30a885248 /codegen/valagdbusclientmodule.vala
parent994b4cb078643d9bb1842fa60ecb69891e1e7b87 (diff)
downloadvala-d6f555908157783a309d049405ebe6b676e2b499.tar.gz
codegen: Introduce VALA_EXPORT for public symbols to improve portability
Use it as replacement for "extern" and attribute every public symbol. We want to ensure that public symbols are exported, which isn't the default when generating a shared library in MSVC, for example.
Diffstat (limited to 'codegen/valagdbusclientmodule.vala')
-rw-r--r--codegen/valagdbusclientmodule.vala7
1 files changed, 6 insertions, 1 deletions
diff --git a/codegen/valagdbusclientmodule.vala b/codegen/valagdbusclientmodule.vala
index 51c83b67b..697b08758 100644
--- a/codegen/valagdbusclientmodule.vala
+++ b/codegen/valagdbusclientmodule.vala
@@ -161,12 +161,17 @@ public class Vala.GDBusClientModule : GDBusModule {
// declare proxy_get_type function
var proxy_get_type = new CCodeFunction (get_type_name, "GType");
- proxy_get_type.modifiers = CCodeModifiers.CONST;
+ proxy_get_type.modifiers = CCodeModifiers.CONST | CCodeModifiers.EXTERN;
+ requires_vala_extern = true;
+
decl_space.add_function_declaration (proxy_get_type);
if (in_plugin) {
var proxy_register_type = new CCodeFunction ("%sproxy_register_dynamic_type".printf (get_ccode_lower_case_prefix (iface)));
proxy_register_type.add_parameter (new CCodeParameter ("module", "GTypeModule*"));
+ proxy_register_type.modifiers |= CCodeModifiers.EXTERN;
+ requires_vala_extern = true;
+
decl_space.add_function_declaration (proxy_register_type);
}
}