diff options
author | Jürg Billeter <j@bitron.ch> | 2010-03-21 09:51:24 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2010-03-21 09:51:24 +0100 |
commit | 6d30c0aa37ffabf26b3c172158a45df514d7670e (patch) | |
tree | d086e4cbdf893d8ae0c38f76237bdfa0de7745ca /ccode | |
parent | 5a27c465bd135334705785556188df630ef172b4 (diff) | |
download | vala-6d30c0aa37ffabf26b3c172158a45df514d7670e.tar.gz |
Avoic C warnings for some possibly unused functions
Diffstat (limited to 'ccode')
-rw-r--r-- | ccode/valaccodefunction.vala | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ccode/valaccodefunction.vala b/ccode/valaccodefunction.vala index 1dfef1b29..2b3775ddf 100644 --- a/ccode/valaccodefunction.vala +++ b/ccode/valaccodefunction.vala @@ -1,6 +1,6 @@ /* valaccodefunction.vala * - * Copyright (C) 2006-2009 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 @@ -41,6 +41,8 @@ public class Vala.CCodeFunction : CCodeNode { */ public string return_type { get; set; } + public string attributes { get; set; } + /** * The function body. */ @@ -70,6 +72,7 @@ public class Vala.CCodeFunction : CCodeNode { public CCodeFunction copy () { var func = new CCodeFunction (name, return_type); func.modifiers = modifiers; + func.attributes = attributes; /* no deep copy for lists available yet * func.parameters = parameters.copy (); @@ -109,7 +112,13 @@ public class Vala.CCodeFunction : CCodeNode { } writer.write_string (")"); + if (block == null) { + if (attributes != null) { + writer.write_string (" "); + writer.write_string (attributes); + } + writer.write_string (";"); } else { block.write (writer); |