summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
Diffstat (limited to 'dist')
-rw-r--r--dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm25
1 files changed, 14 insertions, 11 deletions
diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm
index 841205685e..eb3ba17064 100644
--- a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm
+++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm
@@ -375,19 +375,22 @@ sub process_typemaps {
push @tm, standard_typemap_locations( \@INC );
- my ($type_kind_ref, $proto_letter_ref, $input_expr_ref, $output_expr_ref)
- = ( {}, {}, {}, {} );
-
- foreach my $typemap (@tm) {
- next unless -f $typemap;
+ my $typemap = ExtUtils::Typemaps->new;
+ foreach my $typemap_loc (@tm) {
+ next unless -f $typemap_loc;
# skip directories, binary files etc.
- warn("Warning: ignoring non-text typemap file '$typemap'\n"), next
- unless -T $typemap;
- ($type_kind_ref, $proto_letter_ref, $input_expr_ref, $output_expr_ref) =
- process_single_typemap( $typemap,
- $type_kind_ref, $proto_letter_ref, $input_expr_ref, $output_expr_ref);
+ warn("Warning: ignoring non-text typemap file '$typemap_loc'\n"), next
+ unless -T $typemap_loc;
+
+ $typemap->merge(file => $typemap_loc, replace => 1);
}
- return ($type_kind_ref, $proto_letter_ref, $input_expr_ref, $output_expr_ref);
+
+ return (
+ $typemap->_get_typemap_hash(),
+ $typemap->_get_prototype_hash(),
+ $typemap->_get_inputmap_hash(),
+ $typemap->_get_outputmap_hash(),
+ );
}
=head2 C<process_single_typemap()>