diff options
author | Jürg Billeter <j@bitron.ch> | 2010-07-16 23:34:11 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2010-07-17 00:00:04 +0200 |
commit | cf8204cb9c6054d42edd8129cc082167d6ca0a01 (patch) | |
tree | 29e9d923484610a95135444366d0d5589f517898 /ccode | |
parent | c8b366a4ba7d424b23dc0ecf9097707b6d7ce79c (diff) | |
download | vala-cf8204cb9c6054d42edd8129cc082167d6ca0a01.tar.gz |
dova: Add support for [ThreadLocal] fields
Diffstat (limited to 'ccode')
-rw-r--r-- | ccode/valaccodedeclaration.vala | 5 | ||||
-rw-r--r-- | ccode/valaccodemodifiers.vala | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/ccode/valaccodedeclaration.vala b/ccode/valaccodedeclaration.vala index 556174e65..95216f815 100644 --- a/ccode/valaccodedeclaration.vala +++ b/ccode/valaccodedeclaration.vala @@ -1,6 +1,6 @@ /* valaccodedeclaration.vala * - * Copyright (C) 2006-2008 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 @@ -82,6 +82,9 @@ public class Vala.CCodeDeclaration : CCodeStatement { if ((modifiers & CCodeModifiers.EXTERN) != 0 && !has_initializer ()) { writer.write_string ("extern "); } + if ((modifiers & CCodeModifiers.THREAD_LOCAL) != 0) { + writer.write_string ("thread_local "); + } writer.write_string (type_name); writer.write_string (" "); diff --git a/ccode/valaccodemodifiers.vala b/ccode/valaccodemodifiers.vala index d2a96f212..4dd74557c 100644 --- a/ccode/valaccodemodifiers.vala +++ b/ccode/valaccodemodifiers.vala @@ -1,6 +1,7 @@ /* valaccodemodifiers.vala * - * Copyright (C) 2006-2008 Jürg Billeter, Raffaele Sandrini + * Copyright (C) 2006-2010 Jürg Billeter + * Copyright (C) 2006-2008 Raffaele Sandrini * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -31,5 +32,6 @@ public enum Vala.CCodeModifiers { EXTERN = 1 << 2, INLINE = 1 << 3, VOLATILE = 1 << 4, - DEPRECATED = 1 << 5 + DEPRECATED = 1 << 5, + THREAD_LOCAL = 1 << 6 } |