[vala/staging] codegen: Add target/destroy type declarations for delegates as needed
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] codegen: Add target/destroy type declarations for delegates as needed
- Date: Wed, 21 Nov 2018 11:25:32 +0000 (UTC)
commit f161b99cda373e50a65e33442c1861a27378c929
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Wed Nov 21 10:33:21 2018 +0100
codegen: Add target/destroy type declarations for delegates as needed
This improves the support of POSIX profile.
codegen/valaccodebasemodule.vala | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index a0b4b0575..acadf940e 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -1486,6 +1486,12 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
var deleg_type = (DelegateType) type;
var d = deleg_type.delegate_symbol;
generate_delegate_declaration (d, decl_space);
+ if (d.has_target) {
+ generate_type_declaration (delegate_target_type, decl_space);
+ if (deleg_type.is_disposable ()) {
+ generate_type_declaration (delegate_target_destroy_type, decl_space);
+ }
+ }
} else if (type.data_type is Enum) {
var en = (Enum) type.data_type;
generate_enum_declaration (en, decl_space);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]