[vala/wip/issue/713: 2/2] WIP
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/issue/713: 2/2] WIP
- Date: Sat, 7 Mar 2020 22:49:21 +0000 (UTC)
commit e16f2e096d84e5f80d72f1ba8867cb0ed100ab96
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sat Mar 7 23:47:54 2020 +0100
WIP
codegen/valagtypemodule.vala | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/codegen/valagtypemodule.vala b/codegen/valagtypemodule.vala
index 11151416b..b634fe892 100644
--- a/codegen/valagtypemodule.vala
+++ b/codegen/valagtypemodule.vala
@@ -197,8 +197,7 @@ public class Vala.GTypeModule : GErrorModule {
}
// Custom unref-methods need to be emitted before G_DEFINE_AUTOPTR_CLEANUP_FUNC,
// so we guard against that special case and handle it in generate_method_declaration.
- if (!(base_class.is_compact && is_reference_counting (base_class))
- && (!context.use_header || decl_space.is_header)) {
+ if (!(base_class.is_compact && is_reference_counting (base_class)) && decl_space.is_header) {
string autoptr_cleanup_func;
if (is_reference_counting (base_class)) {
autoptr_cleanup_func = get_ccode_unref_function (base_class);
@@ -424,8 +423,7 @@ public class Vala.GTypeModule : GErrorModule {
// Custom unref-methods need to be emitted before G_DEFINE_AUTOPTR_CLEANUP_FUNC,
// in addition to the non-ref-countable case in generate_class_declaration.
unowned Class? cl = m.parent_symbol as Class;
- if (cl != null && cl.is_compact && get_ccode_unref_function (cl) == get_ccode_name (m)
- && (!context.use_header || decl_space.is_header)) {
+ if (cl != null && cl.is_compact && get_ccode_unref_function (cl) == get_ccode_name
(m) && decl_space.is_header) {
decl_space.add_type_member_declaration (new CCodeIdentifier
("G_DEFINE_AUTOPTR_CLEANUP_FUNC (%s, %s)".printf (get_ccode_name (cl), get_ccode_name (m))));
decl_space.add_type_member_declaration (new CCodeNewline ());
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]