From: Rico Tzschichholz Date: Fri, 14 Jun 2019 06:16:23 +0000 (+0200) Subject: girwriter: Report error on secondary top-level namespace to be written X-Git-Tag: 0.45.2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e96fb6def3ac57f4f67f3064863a3aef6cd651f;p=thirdparty%2Fvala.git girwriter: Report error on secondary top-level namespace to be written Fixes https://gitlab.gnome.org/GNOME/vala/issues/805 --- diff --git a/codegen/valagirwriter.vala b/codegen/valagirwriter.vala index 0c7c5b987..3406f8ee6 100644 --- a/codegen/valagirwriter.vala +++ b/codegen/valagirwriter.vala @@ -332,6 +332,11 @@ public class Vala.GIRWriter : CodeVisitor { return; } + if (our_namespaces.size > 0) { + Report.error (ns.source_reference, "Secondary top-level namespace `%s' is not supported by GIR format".printf (ns.name)); + return; + } + write_c_includes (ns); write_indent ();