[vala/staging] Properly use [Flags] feature for ModifierFlags and CCodeModifiers
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] Properly use [Flags] feature for ModifierFlags and CCodeModifiers
- Date: Fri, 17 Dec 2021 10:47:00 +0000 (UTC)
commit 1133400d67e10fda230abf298385db8dc51eb511
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Fri Dec 17 11:43:33 2021 +0100
Properly use [Flags] feature for ModifierFlags and CCodeModifiers
See 2afaae5e0755b2d8619808d2d148761b92c355b5
ccode/valaccodemodifiers.vala | 32 ++++++++++++++++----------------
vala/valagenieparser.vala | 29 +++++++++++++++--------------
2 files changed, 31 insertions(+), 30 deletions(-)
---
diff --git a/ccode/valaccodemodifiers.vala b/ccode/valaccodemodifiers.vala
index 7b83b5a91..6a8b09b1b 100644
--- a/ccode/valaccodemodifiers.vala
+++ b/ccode/valaccodemodifiers.vala
@@ -27,20 +27,20 @@ using GLib;
[Flags]
public enum Vala.CCodeModifiers {
NONE = 0,
- STATIC = 1 << 0,
- REGISTER = 1 << 1,
- EXTERN = 1 << 2,
- INLINE = 1 << 3,
- VOLATILE = 1 << 4,
- DEPRECATED = 1 << 5,
- THREAD_LOCAL = 1 << 6,
- INTERNAL = 1 << 7,
- CONST = 1 << 8,
- UNUSED = 1 << 9,
- CONSTRUCTOR = 1 << 10,
- DESTRUCTOR = 1 << 11,
- FORMAT_ARG = 1 << 12,
- PRINTF = 1 << 13,
- SCANF = 1 << 14,
- NO_INLINE = 1 << 15
+ STATIC,
+ REGISTER,
+ EXTERN,
+ INLINE,
+ VOLATILE,
+ DEPRECATED,
+ THREAD_LOCAL,
+ INTERNAL,
+ CONST,
+ UNUSED,
+ CONSTRUCTOR,
+ DESTRUCTOR,
+ FORMAT_ARG,
+ PRINTF,
+ SCANF,
+ NO_INLINE
}
diff --git a/vala/valagenieparser.vala b/vala/valagenieparser.vala
index 60c85e36f..0b0e242e3 100644
--- a/vala/valagenieparser.vala
+++ b/vala/valagenieparser.vala
@@ -56,21 +56,22 @@ public class Vala.Genie.Parser : CodeVisitor {
public SourceLocation end;
}
+ [Flags]
enum ModifierFlags {
- NONE,
- ABSTRACT = 1 << 0,
- CLASS = 1 << 1,
- EXTERN = 1 << 2,
- INLINE = 1 << 3,
- NEW = 1 << 4,
- OVERRIDE = 1 << 5,
- STATIC = 1 << 6,
- VIRTUAL = 1 << 7,
- PRIVATE = 1 << 8,
- ASYNC = 1 << 9,
- SEALED = 1 << 10,
- PUBLIC = 1 << 11,
- PROTECTED = 1 << 12,
+ NONE = 0,
+ ABSTRACT,
+ CLASS,
+ EXTERN,
+ INLINE,
+ NEW,
+ OVERRIDE,
+ STATIC,
+ VIRTUAL,
+ PRIVATE,
+ ASYNC,
+ SEALED,
+ PUBLIC,
+ PROTECTED
}
public Parser () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]