[vala: 4/5] ccodefunction: Only add G_GNUC_DEPRECATED to declarations
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala: 4/5] ccodefunction: Only add G_GNUC_DEPRECATED to declarations
- Date: Wed, 4 Jan 2017 13:39:12 +0000 (UTC)
commit 76efeb6f154d2826950b191c978ddd82a5d569dd
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Tue Jan 3 18:52:43 2017 +0100
ccodefunction: Only add G_GNUC_DEPRECATED to declarations
ccode/valaccodefunction.vala | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/ccode/valaccodefunction.vala b/ccode/valaccodefunction.vala
index 394fdac..08d3876 100644
--- a/ccode/valaccodefunction.vala
+++ b/ccode/valaccodefunction.vala
@@ -143,11 +143,11 @@ public class Vala.CCodeFunction : CCodeNode {
writer.write_string (")");
- if (CCodeModifiers.DEPRECATED in modifiers) {
- writer.write_string (" G_GNUC_DEPRECATED");
- }
-
if (is_declaration) {
+ 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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]