[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Re: [xsubpp PATCH 5.005_63]



Sorry if you see this for the second time, but
replying to news://cor.newman.upenn.edu/perl.porters-gw
and CCing to perl5-porters@perl.org doesn't work

jarausch@igpm.rwth-aachen.de wrote:

> Currently xsubpp has a buggy precessing of continuation lines
>
> This test .xs file
>
> MODULE = Test   PACKAGE = Test
>
> void
> foo(X,\
>     Y)
> int X
> int Y
>
> generates buggy C code
>
> XS(XS_Test_foo)
> {
>     dXSARGS;
>     if (items != 2)
>         Perl_croak(aTHX_ "Usage: Test::foo(X,\   <==========
>     Y)");
>     {
>         int     X = (int)SvIV(ST(0));
>         int;                                   <============
>
>         foo(X, \
>     Y);
>     }
>     XSRETURN_EMPTY;
> }
>
> Here is a patch

Sorry, that one was too simple.
Here is a new one which seems to work (rebuild perl5.005_64 with it)

*** perl5.005_63_ORIG/lib/ExtUtils/xsubpp Fri Dec 31 10:31:46 1999
--- perl5.005_63_P/lib/ExtUtils/xsubpp Wed Jan 12 11:43:34 2000
***************
*** 870,877 ****
   last unless defined($lastline = <$FH>);
   $lastline_no = $.;
   my $tmp_line;
!  $lastline .= $tmp_line
!      while ($lastline =~ /\\$/ && defined($tmp_line = <$FH>));

   chomp $lastline;
   $lastline =~ s/^\s+$//;
--- 870,882 ----
   last unless defined($lastline = <$FH>);
   $lastline_no = $.;
   my $tmp_line;
!         if ( $lastline =~ /^#/ ) {
!       $lastline .= $tmp_line
!        while ($lastline =~ /\\$/ && defined($tmp_line = <$FH>));
!         } else {
!       $lastline .= $tmp_line
!           while ($lastline =~ s/\\$// && defined($tmp_line = <$FH>));
!         }

   chomp $lastline;
   $lastline =~ s/^\s+$//;


-- 
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
Institute of Technology, RWTH Aachen
D 52056 Aachen, Germany


[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]