[vala/0.48] girparser: Allow overriding of "Compact" attribute for classes
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.48] girparser: Allow overriding of "Compact" attribute for classes
- Date: Thu, 18 Mar 2021 09:34:56 +0000 (UTC)
commit eb3ac636db18809735b946adb031a81b83004078
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sun Mar 14 08:26:42 2021 +0100
girparser: Allow overriding of "Compact" attribute for classes
vala/valagirparser.vala | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 0171d523e..49e2e9e9c 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -63,6 +63,7 @@ public class Vala.GirParser : CodeVisitor {
VFUNC_NAME,
VIRTUAL,
ABSTRACT,
+ COMPACT,
SEALED,
SCOPE,
STRUCT,
@@ -3495,7 +3496,11 @@ public class Vala.GirParser : CodeVisitor {
bool require_copy_free = false;
if (current.new_symbol) {
cl = new Class (current.name, current.source_reference);
- cl.is_compact = true;
+ if (metadata.has_argument (ArgumentType.COMPACT)) {
+ cl.is_compact = metadata.get_bool (ArgumentType.COMPACT);
+ } else {
+ cl.is_compact = true;
+ }
current.symbol = cl;
} else {
cl = (Class) current.symbol;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]