diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm index b1436f2f668b..f7a6126dfa4b 100644 --- a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm +++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm @@ -1382,9 +1382,10 @@ sub lookup_input_typemap { my $typemaps = $pxs->{typemaps_object}; - # Normalised type ('Foo *' becomes 'FooPtr): one of the valid vars - # which can appear within a typemap template. + # Normalised type ('struct Foo *' becomes 'struct_FooPtr): one of + # the valid vars which can appear within a typemap template. (my $ntype = $type) =~ s/\s*\*/Ptr/g; + $ntype =~ s/\s/_/g; # $subtype is really just for the T_ARRAY / DO_ARRAY_ELEM code below, # where it's the type of each array element. But it's also passed to diff --git a/dist/ExtUtils-ParseXS/lib/perlxstypemap.pod b/dist/ExtUtils-ParseXS/lib/perlxstypemap.pod index 7d1f73c52558..8ae95d708f6c 100644 --- a/dist/ExtUtils-ParseXS/lib/perlxstypemap.pod +++ b/dist/ExtUtils-ParseXS/lib/perlxstypemap.pod @@ -230,8 +230,9 @@ e.g. for a type of C, I<$type> is C =item * -I<$ntype> - the supplied type with C<*> replaced with C. -e.g. for a type of C, I<$ntype> is C +I<$ntype> - the supplied type with C<*> replaced with C and +C<\s> replaced with C<_>. +e.g. for a type of C, I<$ntype> is C =item *