[vala/0.10-parallel: 31/46] Symbol: Add SourceFileType source_type
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.10-parallel: 31/46] Symbol: Add SourceFileType source_type
- Date: Fri, 10 Sep 2010 16:16:30 +0000 (UTC)
commit 07322e5cb2e5d99bbeb167baab515fb5045c4add
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 a093b1f..e6e0137 100644
--- a/vala/valasymbol.vala
+++ b/vala/valasymbol.vala
@@ -156,7 +156,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]