[svn:parrot] r45284 - trunk/lib/Parrot/Pmc2c
fperrad at svn.parrot.org
fperrad at svn.parrot.org
Mon Mar 29 20:02:55 UTC 2010
Author: fperrad
Date: Mon Mar 29 20:02:54 2010
New Revision: 45284
URL: https://trac.parrot.org/parrot/changeset/45284
Log:
[pmc2c] on Windows, generate #line with slash instead of backslash
Modified:
trunk/lib/Parrot/Pmc2c/Emitter.pm
trunk/lib/Parrot/Pmc2c/UtilFunctions.pm
Modified: trunk/lib/Parrot/Pmc2c/Emitter.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/Emitter.pm Mon Mar 29 20:00:55 2010 (r45283)
+++ trunk/lib/Parrot/Pmc2c/Emitter.pm Mon Mar 29 20:02:54 2010 (r45284)
@@ -3,7 +3,7 @@
package Parrot::Pmc2c::Emitter;
use strict;
use warnings;
-use Parrot::Pmc2c::UtilFunctions qw(count_newlines spew escape_filename);
+use Parrot::Pmc2c::UtilFunctions qw(count_newlines spew);
use Parrot::Pmc2c::Pmc2cMain ();
use overload '""' => \&stringify;
use overload 'bool' => \&boolify;
@@ -129,8 +129,8 @@
}
else {
$line = $self->{current_line} if $line == -1;
- my $filename_escaped = escape_filename($filename);
if (!$Parrot::Pmc2c::Pmc2cMain::OPTIONS->{nolines}) {
+ ( my $filename_escaped = $filename ) =~ s|\\|/|g;
$data .= "#line $line \"$filename_escaped\"\n";
}
$data .= $it->{data};
Modified: trunk/lib/Parrot/Pmc2c/UtilFunctions.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/UtilFunctions.pm Mon Mar 29 20:00:55 2010 (r45283)
+++ trunk/lib/Parrot/Pmc2c/UtilFunctions.pm Mon Mar 29 20:02:54 2010 (r45284)
@@ -9,7 +9,7 @@
use base qw( Exporter );
our @EXPORT_OK = qw( count_newlines return_statement dont_edit dynext_load_code
- c_code_coda slurp spew filename escape_filename
+ c_code_coda slurp spew filename
args_from_parameter_list
passable_args_from_parameter_list
);
@@ -74,11 +74,6 @@
return scalar $_[0] =~ tr/\n//;
}
-sub escape_filename {
- ( my $filename = shift ) =~ s|(\\)|$1$1|g;
- return $filename;
-}
-
=item C<dont_edit($pmcfile)>
Returns the "DO NOT EDIT THIS FILE" warning text. C<$pmcfile> is the name
More information about the parrot-commits
mailing list