vala r1620 - in trunk: . vapigen
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1620 - in trunk: . vapigen
- Date: Fri, 20 Jun 2008 19:43:49 +0000 (UTC)
Author: juergbi
Date: Fri Jun 20 19:43:49 2008
New Revision: 1620
URL: http://svn.gnome.org/viewvc/vala?rev=1620&view=rev
Log:
2008-06-20 JÃrg Billeter <j bitron ch>
* vapigen/valagidlparser.vala:
Support 'cheader_filename' attribute for constants and
errordomains, based on patch by Michael Lawrence, fixes bug 533634
Modified:
trunk/ChangeLog
trunk/vapigen/valagidlparser.vala
Modified: trunk/vapigen/valagidlparser.vala
==============================================================================
--- trunk/vapigen/valagidlparser.vala (original)
+++ trunk/vapigen/valagidlparser.vala Fri Jun 20 19:43:49 2008
@@ -770,6 +770,8 @@
bool is_errordomain = false;
+ var cheader_filenames = new ArrayList<string> ();
+
var en_attributes = get_attributes (node.name);
if (en_attributes != null) {
foreach (string attr in en_attributes) {
@@ -777,6 +779,7 @@
if (nv[0] == "common_prefix") {
common_prefix = eval (nv[1]);
} else if (nv[0] == "cheader_filename") {
+ cheader_filenames.add (eval (nv[1]));
en.add_cheader_filename (eval (nv[1]));
} else if (nv[0] == "hidden") {
if (eval (nv[1]) == "1") {
@@ -804,6 +807,10 @@
ed.access = SymbolAccessibility.PUBLIC;
ed.set_cprefix (common_prefix);
+ foreach (string filename in cheader_filenames) {
+ ed.add_cheader_filename (filename);
+ }
+
foreach (EnumValue ev in en.get_values ()) {
ed.add_code (new ErrorCode (ev.name));
}
@@ -1625,11 +1632,15 @@
return null;
}
+ var c = new Constant (node.name, type, null, current_source_reference);
+
string[] attributes = get_attributes (node.name);
if (attributes != null) {
foreach (string attr in attributes) {
var nv = attr.split ("=", 2);
- if (nv[0] == "hidden") {
+ if (nv[0] == "cheader_filename") {
+ c.add_cheader_filename (eval (nv[1]));
+ } else if (nv[0] == "hidden") {
if (eval (nv[1]) == "1") {
return null;
}
@@ -1637,7 +1648,6 @@
}
}
- var c = new Constant (node.name, type, null, current_source_reference);
c.access = SymbolAccessibility.PUBLIC;
return c;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]