summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorSteffen Mueller <smueller@cpan.org>2011-02-11 18:31:44 +0100
committerSteffen Mueller <smueller@cpan.org>2011-07-12 20:54:49 +0200
commit7b40ff231aae5e0d9cbc4550884e68ff9267c229 (patch)
treeb03e59aa145fe9ba2c935725b028c74930680c92 /dist
parenta64e87a87d0e2ae60377d3ed2647be0b75ffea3a (diff)
downloadperl-7b40ff231aae5e0d9cbc4550884e68ff9267c229.tar.gz
Make ExtUtils::ParseXS use ExtUtils::Typemaps
This is just the quick'n'dirty conversion to make it use EU::Typemaps. Eventually, we want to use it in its full object-oriented goodness!
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()>