[vala/staging] codegen: Don't include the full absolute path in line directives
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] codegen: Don't include the full absolute path in line directives
- Date: Mon, 14 May 2018 07:44:25 +0000 (UTC)
commit 49e5fc64db0a5b748dcaaba9f257ba843c7c3934
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Thu Apr 27 21:26:44 2017 +0200
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
codegen/valaccodebasemodule.vala | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 8c8879a..0752a02 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]