diff options
author | Jared Moore <jaredm@svn.gnome.org> | 2008-07-10 11:27:02 +0000 |
---|---|---|
committer | Jared William Moore <jaredm@src.gnome.org> | 2008-07-10 11:27:02 +0000 |
commit | ce363c559d9b055f9039c79c42cca4afdd951f1b (patch) | |
tree | a71c721496ba78df92419294657b02f29efe3751 /ccode | |
parent | b0dc4e986f8060e9f8444966e065061acd4a2416 (diff) | |
download | vala-ce363c559d9b055f9039c79c42cca4afdd951f1b.tar.gz |
Added support for 'volatile' modifier in C code.
2008-07-10 Jared Moore <jaredm@svn.gnome.org>
* ccode/valaccodedeclaration.vala:
* ccode/valaccodemodifiers.vala:
Added support for 'volatile' modifier in C code.
* gobject/valatyperegisterfunction.vala:
Make *_get_type functions thread safe, fixes bug 540705.
svn path=/trunk/; revision=1691
Diffstat (limited to 'ccode')
-rw-r--r-- | ccode/valaccodedeclaration.vala | 3 | ||||
-rw-r--r-- | ccode/valaccodemodifiers.vala | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/ccode/valaccodedeclaration.vala b/ccode/valaccodedeclaration.vala index eb7ada541..7a0223bab 100644 --- a/ccode/valaccodedeclaration.vala +++ b/ccode/valaccodedeclaration.vala @@ -59,6 +59,9 @@ public class Vala.CCodeDeclaration : CCodeStatement { if ((modifiers & CCodeModifiers.STATIC) != 0) { writer.write_string ("static "); } + if ((modifiers & CCodeModifiers.VOLATILE) != 0) { + writer.write_string ("volatile "); + } if ((modifiers & CCodeModifiers.EXTERN) != 0 && !has_initializer ()) { writer.write_string ("extern "); } diff --git a/ccode/valaccodemodifiers.vala b/ccode/valaccodemodifiers.vala index 670bf4e12..90f6809c8 100644 --- a/ccode/valaccodemodifiers.vala +++ b/ccode/valaccodemodifiers.vala @@ -29,5 +29,6 @@ public enum Vala.CCodeModifiers { STATIC = 1 << 0, REGISTER = 1 << 1, EXTERN = 1 << 2, - INLINE = 1 << 3 + INLINE = 1 << 3, + VOLATILE = 1 << 4 } |