Bug#320286: h2xs doesn't recognise enums properly

2008-10-19 Thread Niko Tyni
On Thu, Jul 28, 2005 at 01:36:19PM +1000, Daniel Burr wrote:
 Package: perl
 Version: 5.8.7-3
 Severity: normal
 Tags: patch
 
 h2xs ignores enums which contain C++ style comments and negative
 numbers.

Thanks for the patches and apologies for the lack of response.

The negative number thing was fixed for Perl 5.10.0 with upstream change
25388, see http://rt.perl.org/rt3/Public/Bug/Display.html?id=37142 .

I just forwarded the C++ comment fix to the perl5-porters list for
upstream inclusion.

The 'macro = 1' ExtUtils::Constant fix was also recently submitted as 
#502297, and I have forwarded that upstream too.
-- 
Niko Tyni   [EMAIL PROTECTED]



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#320286: h2xs doesn't recognise enums properly

2005-07-28 Thread Daniel Burr
Package: perl
Version: 5.8.7-3
Severity: normal
Tags: patch

h2xs ignores enums which contain C++ style comments and negative
numbers.

enum {
A = -1, // negative one
B = -2 // negative two
};

This patch fixes the problem:

--- h2xs.orig   2005-07-28 13:32:13.0 +1000
+++ h2xs2005-07-28 13:32:34.0 +1000
@@ -860,8 +860,9 @@

 # Remove C and C++ comments
 $src =~ 
s#/\*[^*]*\*+([^/*][^*]*\*+)*/|((\\.|[^\\])*|'(\\.|[^'\\])*'|.[^/'\\]*)#$2#gs;
+   $src =~ s#//.*\n#\n#g;

-while ($src =~ /(\benum\s*([\w_]*)\s*\{\s([\s\w=,]+)\})/gsc) {
+while ($src =~ /(\benum\s*([\w_]*)\s*\{\s([\s\w=,-]+)\})/gsc) {
 my ($enum_name, $enum_body) =
 $1 =~ /enum\s*([\w_]*)\s*\{\s([\s\w=,]+)\}/gs;
 # skip enums matching $opt_e
---end patch


-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.11.7
Locale: LANG=en_AU, LC_CTYPE=en_AU (charmap=ISO-8859-1)

Versions of packages perl depends on:
ii  libc6   2.3.2.ds1-22 GNU C Library: Shared libraries an
ii  libdb4.24.2.52-18Berkeley v4.2 Database Libraries [
ii  libgdbm31.8.3-2  GNU dbm database routines (runtime
ii  perl-base   5.8.7-3  The Pathologically Eclectic Rubbis
ii  perl-modules5.8.7-3  Core Perl modules

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]