[vala/0.14] Report warning on duplicate attributes
- From: JÃrg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.14] Report warning on duplicate attributes
- Date: Mon, 12 Dec 2011 20:36:27 +0000 (UTC)
commit 12ef1b14c6f3bda672e0cef6250ef955d0cff771
Author: JÃrg Billeter <j bitron ch>
Date: Fri Dec 9 13:15:08 2011 +0100
Report warning on duplicate attributes
vala/valaparser.vala | 3 +++
vapi/libosso.vapi | 2 +-
vapi/linux.vapi | 1 -
3 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/vala/valaparser.vala b/vala/valaparser.vala
index 8aee796..89c8440 100644
--- a/vala/valaparser.vala
+++ b/vala/valaparser.vala
@@ -2149,6 +2149,9 @@ public class Vala.Parser : CodeVisitor {
void set_attributes (CodeNode node, List<Attribute>? attributes) {
if (attributes != null) {
foreach (Attribute attr in (List<Attribute>) attributes) {
+ if (node.get_attribute (attr.name) != null) {
+ Report.warning (attr.source_reference, "ignoring duplicate attribute `%s`".printf (attr.name));
+ }
node.attributes.append (attr);
}
}
diff --git a/vapi/libosso.vapi b/vapi/libosso.vapi
index 95e5f24..c6879c5 100644
--- a/vapi/libosso.vapi
+++ b/vapi/libosso.vapi
@@ -96,7 +96,7 @@ namespace Osso {
/* Time Notification */
[CCode (cname = "osso_time_set_notification_cb")]
public Status set_time_notification_callback (TimeCallback cb, void* data);
- [CCode (cname = "osso_time_set")]
+ //[CCode (cname = "osso_time_set")]
//public Status set_time (time_t new_time);
/* Locale */
diff --git a/vapi/linux.vapi b/vapi/linux.vapi
index 3e1de3f..48b2ec8 100644
--- a/vapi/linux.vapi
+++ b/vapi/linux.vapi
@@ -3407,7 +3407,6 @@ namespace Linux {
[CCode (cheader_filename = "termios.h")]
public const int TIOCM_DSR;
[CCode (cheader_filename = "termios.h")]
- [CCode (cheader_filename = "termios.h")]
public const int TIOCM_OUT1;
[CCode (cheader_filename = "termios.h")]
public const int TIOCM_OUT2;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]