1 |
|
2 |
Generate the XS typemap files in sorted order; ensures that the |
3 |
devel package contents do not differe across multilib platforms. |
4 |
|
5 |
--- mod_perl-2.0.4/lib/ModPerl/TypeMap.pm.multilib |
6 |
+++ mod_perl-2.0.4/lib/ModPerl/TypeMap.pm |
7 |
@@ -442,12 +442,12 @@ sub typedefs_code { |
8 |
$code .= qq{\#include "$_"\n} |
9 |
} |
10 |
|
11 |
- for my $t (@{ $self->{struct} }) { |
12 |
+ for my $t (sort {$a->[1] cmp $b->[1]} @{ $self->{struct} }) { |
13 |
next if $seen{ $t->[1] }++; |
14 |
$code .= "typedef $t->[0] * $t->[1];\n"; |
15 |
} |
16 |
|
17 |
- for my $t (@{ $self->{typedef} }) { |
18 |
+ for my $t (sort {$a->[1] cmp $b->[1]} @{ $self->{typedef} }) { |
19 |
next if $seen{ $t->[1] }++; |
20 |
$code .= "typedef $t->[0] $t->[1];\n"; |
21 |
} |
22 |
@@ -470,7 +470,9 @@ sub sv_convert_code { |
23 |
my %seen; |
24 |
my $code = ""; |
25 |
|
26 |
- while (my ($ctype, $ptype) = each %$map) { |
27 |
+ for my $ctype (sort keys %$map) { |
28 |
+ my $ptype = $map->{$ctype}; |
29 |
+ |
30 |
next if $self->special($ptype); |
31 |
next if $ctype =~ /\s/; |
32 |
my $class = $ptype; |