summaryrefslogtreecommitdiff
path: root/vapigen
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2009-01-04 14:55:19 +0000
committerJürg Billeter <juergbi@src.gnome.org>2009-01-04 14:55:19 +0000
commit6ef766c66898ae3f162274226eda0fde04d173a0 (patch)
tree864fdf9d8c02f7e07be52fa6b59fd26a82ef8406 /vapigen
parent8cbc51a120f6d9290de313f53f0a2328971f4c30 (diff)
downloadvala-6ef766c66898ae3f162274226eda0fde04d173a0.tar.gz
Replace [NoArrayLength] by [CCode (array_length = false)], which can also
2009-01-04 Jürg Billeter <j@bitron.ch> * vala/valacodewriter.vala: * vala/valadelegate.vala: * vala/valafield.vala: * vala/valaformalparameter.vala: * vala/valamethod.vala: Replace [NoArrayLength] by [CCode (array_length = false)], which can also be applied to single parameters, fixes bug 532486 * gobject/valaccodecompiler.vala: * compiler/valacompiler.vala: * vapi/glib-2.0.vapi: * vapigen/valagidlparser.vala: * vapigen/valavapigen.vala: Adapt to attribute changes svn path=/trunk/; revision=2265
Diffstat (limited to 'vapigen')
-rw-r--r--vapigen/valagidlparser.vala8
-rw-r--r--vapigen/valavapigen.vala11
2 files changed, 14 insertions, 5 deletions
diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala
index 5b16b34ff..eea086064 100644
--- a/vapigen/valagidlparser.vala
+++ b/vapigen/valagidlparser.vala
@@ -1,6 +1,7 @@
/* valagidlparser.vala
*
- * Copyright (C) 2006-2008 Jürg Billeter, Raffaele Sandrini
+ * Copyright (C) 2006-2009 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
@@ -1509,6 +1510,10 @@ public class Vala.GIdlParser : CodeVisitor {
} else if (eval (nv[1]) == "0") {
show_param = true;
}
+ } else if (nv[0] == "no_array_length") {
+ if (eval (nv[1]) == "1") {
+ p.no_array_length = true;
+ }
} else if (nv[0] == "array_length_pos") {
set_array_length_pos = true;
array_length_pos = eval (nv[1]).to_double ();
@@ -1803,6 +1808,7 @@ public class Vala.GIdlParser : CodeVisitor {
return field;
}
+ [CCode (array_length = false)]
[NoArrayLength]
private string[]? get_attributes (string codenode) {
var attributes = codenode_attributes_map.get (codenode);
diff --git a/vapigen/valavapigen.vala b/vapigen/valavapigen.vala
index 289aee1ab..997affd60 100644
--- a/vapigen/valavapigen.vala
+++ b/vapigen/valavapigen.vala
@@ -1,6 +1,6 @@
/* valavapigen.vala
*
- * Copyright (C) 2006-2008 Jürg Billeter
+ * Copyright (C) 2006-2009 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
@@ -26,12 +26,15 @@ class Vala.VAPIGen : Object {
static string directory;
static bool version;
static bool quiet_mode;
- [NoArrayLength ()]
+ [CCode (array_length = false)]
+ [NoArrayLength]
static string[] sources;
- [NoArrayLength ()]
+ [CCode (array_length = false)]
+ [NoArrayLength]
static string[] vapi_directories;
static string library;
- [NoArrayLength ()]
+ [CCode (array_length = false)]
+ [NoArrayLength]
static string[] packages;
static string metadata_filename;
CodeContext context;