[vala/0.10-parallel: 17/32] Symbol: Add SourceFileType source_type
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.10-parallel: 17/32] Symbol: Add SourceFileType source_type
- Date: Fri, 17 Sep 2010 23:02:25 +0000 (UTC)
commit 7da7e4f0296e1c4905abdad1e00c042073d044ac
Author: Ryan Lortie <desrt desrt ca>
Date: Tue Aug 24 21:51:55 2010 +0200
Symbol: Add SourceFileType source_type
Pass this through from the SourceFileType of the source file. If there
is no source file, use SourceFileType.NONE.
Redefine 'external_package' in terms of this new property.
vala/valasymbol.vala | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/vala/valasymbol.vala b/vala/valasymbol.vala
index a189a8e..b636624 100644
--- a/vala/valasymbol.vala
+++ b/vala/valasymbol.vala
@@ -168,7 +168,21 @@ public abstract class Vala.Symbol : CodeNode {
*/
public bool external_package {
get {
- return (source_reference != null && source_reference.file.file_type == SourceFileType.PACKAGE);
+ return source_type == SourceFileType.PACKAGE;
+ }
+ }
+
+ /**
+ * Gets the SourceFileType of the source file that this symbol
+ * came from, or SourceFileType.NONE.
+ */
+ public SourceFileType source_type {
+ get {
+ if (source_reference != null) {
+ return source_reference.file.file_type;
+ } else {
+ return SourceFileType.NONE;
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]