[vala/staging] girparser: Allow overriding of "Compact" attribute for classes
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] girparser: Allow overriding of "Compact" attribute for classes
- Date: Sun, 14 Mar 2021 09:32:22 +0000 (UTC)
commit db9f3452474181acaba3da72ad65e294f3e86807
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 023581714..ddd511f24 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,
@@ -3521,7 +3522,11 @@ public class Vala.GirParser : CodeVisitor {
bool require_copy_free = false;
if (current.new_symbol) {
cl = new Class (current.name, current.source_reference);
- cl.set_attribute ("Compact", true);
+ if (metadata.has_argument (ArgumentType.COMPACT)) {
+ cl.set_attribute ("Compact", metadata.get_bool (ArgumentType.COMPACT));
+ } else {
+ cl.set_attribute ("Compact", true);
+ }
current.symbol = cl;
} else {
cl = (Class) current.symbol;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]