summaryrefslogtreecommitdiff
path: root/ccode/valaccodestruct.vala
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2010-08-05 21:10:20 +0200
committerJürg Billeter <j@bitron.ch>2010-08-05 21:14:42 +0200
commit0045f1b9394f4272b7b901f7d6c9a55b5767bc8e (patch)
tree53dbdd430ab0a50ff1e9a625bab8b5e15fb239b3 /ccode/valaccodestruct.vala
parent1852b4cfb278fbf0746251a94d2a8040e5670562 (diff)
downloadvala-0045f1b9394f4272b7b901f7d6c9a55b5767bc8e.tar.gz
dova: Do not generate empty structs
Diffstat (limited to 'ccode/valaccodestruct.vala')
-rw-r--r--ccode/valaccodestruct.vala6
1 files changed, 4 insertions, 2 deletions
diff --git a/ccode/valaccodestruct.vala b/ccode/valaccodestruct.vala
index 20cae7996..76f7679f2 100644
--- a/ccode/valaccodestruct.vala
+++ b/ccode/valaccodestruct.vala
@@ -1,6 +1,6 @@
/* valaccodestruct.vala
*
- * Copyright (C) 2006-2007 Jürg Billeter
+ * Copyright (C) 2006-2010 Jürg Billeter
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -35,7 +35,9 @@ public class Vala.CCodeStruct : CCodeNode {
* Whether the struct is deprecated.
*/
public bool deprecated { get; set; default = false; }
-
+
+ public bool is_empty { get { return declarations.size == 0; } }
+
private List<CCodeDeclaration> declarations = new ArrayList<CCodeDeclaration> ();
public CCodeStruct (string name) {