From: Rico Tzschichholz Date: Thu, 27 Apr 2017 19:26:44 +0000 (+0200) Subject: codegen: Don't include the full absolute path in line directives X-Git-Tag: 0.41.90~136 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49e5fc64db0a5b748dcaaba9f257ba843c7c3934;p=thirdparty%2Fvala.git codegen: Don't include the full absolute path in line directives Only write source's filename prepended by the path relative to the directory the valac call origined from. https://bugzilla.gnome.org/show_bug.cgi?id=769935 --- diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala index 8c8879a9c..0752a0209 100644 --- a/codegen/valaccodebasemodule.vala +++ b/codegen/valaccodebasemodule.vala @@ -592,7 +592,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator { public void push_line (SourceReference? source_reference) { line_directive_stack.add (current_line); if (source_reference != null) { - current_line = new CCodeLineDirective (source_reference.file.filename, source_reference.begin.line); + current_line = new CCodeLineDirective (source_reference.file.get_relative_filename (), source_reference.begin.line); if (ccode != null) { ccode.current_line = current_line; }