Author: tewk
Date: Wed Jun 13 10:19:18 2007
New Revision: 18976
Removed:
branches/pmc2c/lib/Parrot/Pmc2c/CodeFragment.pm
Modified:
branches/pmc2c/lib/Parrot/Pmc2c/Emitter.pm
Log:
[Pmc2c branch] Fixed filename escapeing
Modified: branches/pmc2c/lib/Parrot/Pmc2c/Emitter.pm
==============================================================================
--- branches/pmc2c/lib/Parrot/Pmc2c/Emitter.pm (original)
+++ branches/pmc2c/lib/Parrot/Pmc2c/Emitter.pm Wed Jun 13 10:19:18 2007
@@ -133,7 +133,8 @@
}
else {
$line = $self->{current_line} if $line == -1;;
- $data .= "#line $line \"$filename\"\n";
+ ( my $filename_escaped = $filename) =~ s|(\\)|$1$1|g;
+ $data .= "#line $line \"$filename_escaped\"\n";
$data .= $it->{data};
}
$self->{output} .= $data;