summaryrefslogtreecommitdiff
path: root/ccode/valaccodefunctiondeclarator.vala
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2017-01-03 18:55:18 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2017-01-04 14:38:11 +0100
commit4e3103bfd1928b080df77b68e6015fae609ad351 (patch)
treea30c7ae1f00a24a9b76e4770735dd7e1a4be6d6d /ccode/valaccodefunctiondeclarator.vala
parent76efeb6f154d2826950b191c978ddd82a5d569dd (diff)
downloadvala-4e3103bfd1928b080df77b68e6015fae609ad351.tar.gz
Move writing of G_GNUC_DEPRECATED down to CCodeDeclarator implementations
Doing so in CCodeDeclaration is error-prone. CCodeVariableDeclarator still requires special handling which isn't done here.
Diffstat (limited to 'ccode/valaccodefunctiondeclarator.vala')
-rw-r--r--ccode/valaccodefunctiondeclarator.vala4
1 files changed, 4 insertions, 0 deletions
diff --git a/ccode/valaccodefunctiondeclarator.vala b/ccode/valaccodefunctiondeclarator.vala
index b195f5ae3..30f0c63b1 100644
--- a/ccode/valaccodefunctiondeclarator.vala
+++ b/ccode/valaccodefunctiondeclarator.vala
@@ -77,6 +77,10 @@ public class Vala.CCodeFunctionDeclarator : CCodeDeclarator {
writer.write_string (")");
+ if (CCodeModifiers.DEPRECATED in modifiers) {
+ writer.write_string (" G_GNUC_DEPRECATED");
+ }
+
if (CCodeModifiers.PRINTF in modifiers) {
format_arg_index = (format_arg_index >= 0 ? format_arg_index + 1 : args_index);
writer.write_string (" G_GNUC_PRINTF(%d,%d)".printf (format_arg_index, args_index + 1));