/* 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
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 (" ");
/* 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
EXTERN = 1 << 2,
INLINE = 1 << 3,
VOLATILE = 1 << 4,
- DEPRECATED = 1 << 5
+ DEPRECATED = 1 << 5,
+ THREAD_LOCAL = 1 << 6
}
} else {
cdecl.modifiers = CCodeModifiers.EXTERN;
}
+
+ if (f.get_attribute ("ThreadLocal") != null) {
+ cdecl.modifiers |= CCodeModifiers.THREAD_LOCAL;
+ }
+
decl_space.add_type_member_declaration (cdecl);
}
} else {
var_def.modifiers = CCodeModifiers.STATIC;
}
+
+ if (f.get_attribute ("ThreadLocal") != null) {
+ var_def.modifiers |= CCodeModifiers.THREAD_LOCAL;
+ }
+
source_declarations.add_type_member_declaration (var_def);
}
}