Change 25388 by [EMAIL PROTECTED] on 2005/09/12 14:32:29
Subject: [perl #37142] h2xs skips enums with negative values
From: Aaron Kaplan (via RT) <[EMAIL PROTECTED]>
Date: Sun, 11 Sep 2005 13:33:44 -0700
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/utils/h2xs.PL#96 edit
Differences ...
==== //depot/perl/utils/h2xs.PL#96 (text) ====
Index: perl/utils/h2xs.PL
--- perl/utils/h2xs.PL#95~25261~ Tue Aug 2 03:39:51 2005
+++ perl/utils/h2xs.PL Mon Sep 12 07:32:29 2005
@@ -894,9 +894,8 @@
# Remove C and C++ comments
$src =~
s#/\*[^*]*\*+([^/*][^*]*\*+)*/|("(\\.|[^"\\])*"|'(\\.|[^'\\])*'|.[^/"'\\]*)#$2#gs;
- while ($src =~ /(\benum\s*([\w_]*)\s*\{\s([\s\w=,]+)\})/gsc) {
- my ($enum_name, $enum_body) =
- $1 =~ /enum\s*([\w_]*)\s*\{\s([\s\w=,]+)\}/gs;
+ while ($src =~ /\benum\s*([\w_]*)\s*\{\s([^}]+)\}/gsc) {
+ my ($enum_name, $enum_body) = ($1, $2);
# skip enums matching $opt_e
next if $opt_e && $enum_name =~ /$opt_e/;
my $val = 0;
End of Patch.