[valadoc] Fix building with Vala 0.12 branch
- From: Florian Brosch <flobrosch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [valadoc] Fix building with Vala 0.12 branch
- Date: Fri, 29 Oct 2010 16:41:52 +0000 (UTC)
commit b6c980fe26b3b51399d9bb6cd92a36e900d6eff6
Author: Evan Nemerson <evan coeus-group com>
Date: Fri Oct 29 17:20:35 2010 +0200
Fix building with Vala 0.12 branch
configure.in | 4 ++--
src/doclets/gtkdoc/doclet.vala | 3 ++-
src/libvaladoc/api/field.vala | 2 +-
src/libvaladoc/api/method.vala | 2 +-
src/libvaladoc/api/tree.vala | 16 ++++++++--------
src/libvaladoc/html/htmlmarkupwriter.vala | 4 ++--
.../importer/girdocumentationimporter.vala | 2 +-
7 files changed, 17 insertions(+), 16 deletions(-)
---
diff --git a/configure.in b/configure.in
index 9776d43..2d606cc 100644
--- a/configure.in
+++ b/configure.in
@@ -25,8 +25,8 @@ AM_CONDITIONAL(ENABLE_VALADOCORG, test x$enable_valadocorg = xyes)
-VALA_PACKAGE=vala-0.10
-LIBVALA_REQUIRED=0.10.0
+VALA_PACKAGE=libvala-0.12
+LIBVALA_REQUIRED=0.11.0
LIBGEE_REQUIRED=0.5
LIBGVC_REQUIRED=2.16
GLIB_REQUIRED=2.12.0
diff --git a/src/doclets/gtkdoc/doclet.vala b/src/doclets/gtkdoc/doclet.vala
index 9d2c1f6..c0b273a 100644
--- a/src/doclets/gtkdoc/doclet.vala
+++ b/src/doclets/gtkdoc/doclet.vala
@@ -51,7 +51,8 @@ namespace Gtkdoc.Config {
var opt_context = new OptionContext ("- Vala GTK-Doc");
opt_context.set_help_enabled (true);
opt_context.add_main_entries (options, null);
- opt_context.parse (ref args);
+ unowned string[] gtkdoc_args = args;
+ opt_context.parse (ref gtkdoc_args);
} catch (OptionError e) {
warning ("GtkDoc: Error: %s", e.message);
warning ("GtkDoc: Run '-X --help' to see a full list of available command line options.\n");
diff --git a/src/libvaladoc/api/field.vala b/src/libvaladoc/api/field.vala
index 3203603..d94d26e 100644
--- a/src/libvaladoc/api/field.vala
+++ b/src/libvaladoc/api/field.vala
@@ -41,7 +41,7 @@ public class Valadoc.Api.Field : Member {
return false;
}
- return ((Vala.Field) symbol).binding == MemberBinding.STATIC;
+ return ((Vala.Field) symbol).binding == Vala.MemberBinding.STATIC;
}
}
diff --git a/src/libvaladoc/api/method.vala b/src/libvaladoc/api/method.vala
index cca6686..a62bd41 100644
--- a/src/libvaladoc/api/method.vala
+++ b/src/libvaladoc/api/method.vala
@@ -78,7 +78,7 @@ public class Valadoc.Api.Method : Member {
if (is_constructor) {
return false;
}
- return ((Vala.Method) symbol).binding == MemberBinding.STATIC;
+ return ((Vala.Method) symbol).binding == Vala.MemberBinding.STATIC;
}
}
diff --git a/src/libvaladoc/api/tree.vala b/src/libvaladoc/api/tree.vala
index 639cfc6..cb305c4 100644
--- a/src/libvaladoc/api/tree.vala
+++ b/src/libvaladoc/api/tree.vala
@@ -163,7 +163,7 @@ public class Valadoc.Api.Tree {
this.context.experimental = settings.experimental;
this.context.experimental_non_null = settings.experimental || settings.experimental_non_null;
this.context.dbus_transformation = !settings.disable_dbus_transformation;
-
+ this.context.vapi_directories = settings.vapi_directories;
if (settings.basedir == null) {
context.basedir = realpath (".");
@@ -241,15 +241,15 @@ public class Valadoc.Api.Tree {
return true;
}
- var package_path = context.get_package_path (pkg, settings.vapi_directories);
+ var package_path = context.get_vapi_path (pkg) ?? context.get_gir_path (pkg);
if (package_path == null) {
+ Vala.Report.error (null, "Package `%s' not found in specified Vala API directories or GObject-Introspection GIR directories".printf (pkg));
return false;
}
context.add_package (pkg);
-
- var vfile = new Vala.SourceFile (context, package_path, true);
+ var vfile = new Vala.SourceFile (context, Vala.SourceFileType.PACKAGE, package_path);
context.add_source_file (vfile);
Package vdpkg = new Package (vfile, pkg, true);
@@ -285,7 +285,7 @@ public class Valadoc.Api.Tree {
public void add_depencies (string[] packages) {
foreach (string package in packages) {
if (!add_package (package)) {
- Vala.Report.error (null, "%s not found in specified Vala API directories".printf (package));
+ Vala.Report.error (null, "Package `%s' not found in specified Vala API directories or GObject-Introspection GIR directories".printf (package));
}
}
}
@@ -299,7 +299,7 @@ public class Valadoc.Api.Tree {
if (FileUtils.test (source, FileTest.EXISTS)) {
var rpath = realpath (source);
if (source.has_suffix (".vala") || source.has_suffix (".gs")) {
- var source_file = new Vala.SourceFile (context, rpath);
+ var source_file = new Vala.SourceFile (context, Vala.SourceFileType.SOURCE, rpath);
if (this.sourcefiles == null) {
@@ -324,9 +324,9 @@ public class Valadoc.Api.Tree {
context.add_source_file (source_file);
} else if (source.has_suffix (".vapi")) {
string file_name = Path.get_basename (source);
- file_name = file_name.ndup (file_name.size() - ".vapi".size());
+ file_name = file_name.ndup (file_name.length - ".vapi".length);
- var vfile = new Vala.SourceFile (context, rpath, true);
+ var vfile = new Vala.SourceFile (context, Vala.SourceFileType.PACKAGE, rpath);
Package vdpkg = new Package (vfile, file_name);
context.add_source_file (vfile);
this.packages.add (vdpkg);
diff --git a/src/libvaladoc/html/htmlmarkupwriter.vala b/src/libvaladoc/html/htmlmarkupwriter.vala
index 7fbf6e1..7599d18 100755
--- a/src/libvaladoc/html/htmlmarkupwriter.vala
+++ b/src/libvaladoc/html/htmlmarkupwriter.vala
@@ -67,7 +67,7 @@ public class Valadoc.Html.MarkupWriter : Valadoc.MarkupWriter {
return this;
}
- private override bool inline_element (string name) {
+ protected override bool inline_element (string name) {
return name != "html"
&& name != "head"
&& name != "title"
@@ -90,7 +90,7 @@ public class Valadoc.Html.MarkupWriter : Valadoc.MarkupWriter {
&& name != "img";
}
- private override bool content_inline_element (string name) {
+ protected override bool content_inline_element (string name) {
return name == "title"
|| name == "p"
|| name == "a"
diff --git a/src/libvaladoc/importer/girdocumentationimporter.vala b/src/libvaladoc/importer/girdocumentationimporter.vala
index a76215b..19c5999 100644
--- a/src/libvaladoc/importer/girdocumentationimporter.vala
+++ b/src/libvaladoc/importer/girdocumentationimporter.vala
@@ -53,7 +53,7 @@ public class Valadoc.Importer.GirDocumentationImporter : DocumentationImporter {
void parse_file (string gir_file) {
reader = new Vala.MarkupReader (gir_file);
- this.current_source_file = new Vala.SourceFile (tree.context, GLib.Path. get_basename (gir_file));
+ this.current_source_file = new Vala.SourceFile (tree.context, Vala.SourceFileType.PACKAGE, GLib.Path.get_basename (gir_file));
// xml prolog
next ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]