dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm converts Perl XS code into C code
dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pod ExtUtils::ParseXS documentation
dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm ExtUtils::ParseXS guts
-dist/ExtUtils-ParseXS/lib/ExtUtils/Typemap/InputMap.pm ExtUtils::Typemap guts
-dist/ExtUtils-ParseXS/lib/ExtUtils/Typemap/OutputMap.pm ExtUtils::Typemap guts
-dist/ExtUtils-ParseXS/lib/ExtUtils/Typemap.pm ExtUtils::Typemap, a PXS helper
-dist/ExtUtils-ParseXS/lib/ExtUtils/Typemap/Type.pm ExtUtils::Typemap guts
+dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/InputMap.pm ExtUtils::Typemaps guts
+dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/OutputMap.pm ExtUtils::Typemaps guts
+dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps.pm ExtUtils::Typemaps, a PXS helper
+dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/Type.pm ExtUtils::Typemaps guts
dist/ExtUtils-ParseXS/lib/ExtUtils/xsubpp External subroutine preprocessor
dist/ExtUtils-ParseXS/t/001-basic.t See if ExtUtils::ParseXS works
dist/ExtUtils-ParseXS/t/002-more.t Extended ExtUtils::ParseXS testing
dist/ExtUtils-ParseXS/t/112-set_cond.t ExtUtils::ParseXS tests
dist/ExtUtils-ParseXS/t/113-check_cond_preproc_statements.t ExtUtils::ParseXS tests
dist/ExtUtils-ParseXS/t/114-blurt_death_Warn.t ExtUtils::ParseXS tests
-dist/ExtUtils-ParseXS/t/501-t-compile.t ExtUtils::Typemap tests
-dist/ExtUtils-ParseXS/t/510-t-bare.t ExtUtils::Typemap tests
-dist/ExtUtils-ParseXS/t/511-t-whitespace.t ExtUtils::Typemap tests
-dist/ExtUtils-ParseXS/t/512-t-file.t ExtUtils::Typemap tests
-dist/ExtUtils-ParseXS/t/513-t-merge.t ExtUtils::Typemap tests
-dist/ExtUtils-ParseXS/t/data/combined.typemap ExtUtils::Typemap test data
-dist/ExtUtils-ParseXS/t/data/other.typemap ExtUtils::Typemap test data
-dist/ExtUtils-ParseXS/t/data/simple.typemap ExtUtils::Typemap test data
+dist/ExtUtils-ParseXS/t/501-t-compile.t ExtUtils::Typemaps tests
+dist/ExtUtils-ParseXS/t/510-t-bare.t ExtUtils::Typemaps tests
+dist/ExtUtils-ParseXS/t/511-t-whitespace.t ExtUtils::Typemaps tests
+dist/ExtUtils-ParseXS/t/512-t-file.t ExtUtils::Typemaps tests
+dist/ExtUtils-ParseXS/t/513-t-merge.t ExtUtils::Typemaps tests
+dist/ExtUtils-ParseXS/t/data/combined.typemap ExtUtils::Typemaps test data
+dist/ExtUtils-ParseXS/t/data/other.typemap ExtUtils::Typemaps test data
+dist/ExtUtils-ParseXS/t/data/simple.typemap ExtUtils::Typemaps test data
dist/ExtUtils-ParseXS/t/lib/IncludeTester.pm ExtUtils::ParseXS testing utility
dist/ExtUtils-ParseXS/t/lib/PrimitiveCapture.pm Primitive STDOUT/ERR capturing for tests
dist/ExtUtils-ParseXS/t/pseudotypemap1 A test-typemap
-package ExtUtils::Typemap;
+package ExtUtils::Typemaps;
use 5.006001;
use strict;
use warnings;
our $Proto_Regexp = "[" . quotemeta('\$%&*@;[]') . "]";
-require ExtUtils::Typemap::InputMap;
-require ExtUtils::Typemap::OutputMap;
-require ExtUtils::Typemap::Type;
+require ExtUtils::Typemaps::InputMap;
+require ExtUtils::Typemaps::OutputMap;
+require ExtUtils::Typemaps::Type;
=head1 NAME
-ExtUtils::Typemap - Read/Write/Modify Perl/XS typemap files
+ExtUtils::Typemaps - Read/Write/Modify Perl/XS typemap files
=head1 SYNOPSIS
# read/create file
- my $typemap = ExtUtils::Typemap->new(file => 'typemap');
+ my $typemap = ExtUtils::Typemaps->new(file => 'typemap');
# alternatively create an in-memory typemap
- # $typemap = ExtUtils::Typemap->new();
+ # $typemap = ExtUtils::Typemaps->new();
# alternatively create an in-memory typemap by parsing a string
- # $typemap = ExtUtils::Typemap->new(string => $sometypemap);
+ # $typemap = ExtUtils::Typemaps->new(string => $sometypemap);
# add a mapping
$typemap->add_typemap(ctype => 'NV', xstype => 'T_NV');
existing C<TYPEMAP> entries of the same C<ctype>.
As an alternative to the named parameters usage, you may pass in
-an C<ExtUtils::Typemap::Type> object, a copy of which will be
+an C<ExtUtils::Typemaps::Type> object, a copy of which will be
added to the typemap.
=cut
my $xstype = $args{xstype};
croak("Need xstype argument") if not defined $xstype;
- $type = ExtUtils::Typemap::Type->new(
+ $type = ExtUtils::Typemaps::Type->new(
xstype => $xstype,
'prototype' => $args{'prototype'},
ctype => $ctype,
Optional named arguments: C<replace =E<gt> 1> forces removal/replacement of
existing C<INPUT> entries of the same C<xstype>.
-You may pass in a single C<ExtUtils::Typemap::InputMap> object instead,
+You may pass in a single C<ExtUtils::Typemaps::InputMap> object instead,
a copy of which will be added to the typemap.
=cut
my $code = $args{code};
croak("Need code argument") if not defined $code;
- $input = ExtUtils::Typemap::InputMap->new(
+ $input = ExtUtils::Typemaps::InputMap->new(
xstype => $xstype,
code => $code,
);
my $code = $args{code};
croak("Need code argument") if not defined $code;
- $output = ExtUtils::Typemap::OutputMap->new(
+ $output = ExtUtils::Typemaps::OutputMap->new(
xstype => $xstype,
code => $code,
);
croak("Need 'string' argument") if not defined $args{string};
# no, this is not elegant.
- my $other = ExtUtils::Typemap->new(string => $args{string});
+ my $other = ExtUtils::Typemaps->new(string => $args{string});
$self->merge(typemap => $other);
}
Required named argument: C<ctype> to specify the entry to remove from the typemap.
-Alternatively, you may pass a single C<ExtUtils::Typemap::Type> object.
+Alternatively, you may pass a single C<ExtUtils::Typemaps::Type> object.
=cut
Required named argument: C<xstype> to specify the entry to remove from the typemap.
-Alternatively, you may pass a single C<ExtUtils::Typemap::InputMap> object.
+Alternatively, you may pass a single C<ExtUtils::Typemaps::InputMap> object.
=cut
Required named argument: C<xstype> to specify the entry to remove from the typemap.
-Alternatively, you may pass a single C<ExtUtils::Typemap::OutputMap> object.
+Alternatively, you may pass a single C<ExtUtils::Typemaps::OutputMap> object.
=cut
Mandatory named arguments: The C<ctype> of the entry.
-Returns the C<ExtUtils::Typemap::Type>
+Returns the C<ExtUtils::Typemaps::Type>
object for the entry if found.
=cut
Mandatory named arguments: The C<xstype> of the
entry.
-Returns the C<ExtUtils::Typemap::InputMap>
+Returns the C<ExtUtils::Typemaps::InputMap>
object for the entry if found.
=cut
Mandatory named arguments: The C<xstype> of the
entry.
-Returns the C<ExtUtils::Typemap::InputMap>
+Returns the C<ExtUtils::Typemaps::InputMap>
object for the entry if found.
=cut
my $self = shift;
my %args = @_;
my $typemap = $args{typemap};
- croak("Need ExtUtils::Typemap as argument")
- if not ref $typemap or not $typemap->isa('ExtUtils::Typemap');
+ croak("Need ExtUtils::Typemaps as argument")
+ if not ref $typemap or not $typemap->isa('ExtUtils::Typemaps');
my $replace = $args{replace};
#$proto = '$' unless $proto;
#warn("Warning: File '$filename' Line $lineno '$line' Invalid prototype '$proto'\n")
# unless _valid_proto_string($proto);
- push @typemap_expr, ExtUtils::Typemap::Type->new(
+ push @typemap_expr, ExtUtils::Typemaps::Type->new(
xstype => $kind, proto => $proto, ctype => $type
);
} elsif (/^\s/) {
} # end while lines
$self->{typemap_section} = \@typemap_expr;
- $self->{input_section} = [ map {ExtUtils::Typemap::InputMap->new(%$_) } @input_expr ];
- $self->{output_section} = [ map {ExtUtils::Typemap::OutputMap->new(%$_) } @output_expr ];
+ $self->{input_section} = [ map {ExtUtils::Typemaps::InputMap->new(%$_) } @input_expr ];
+ $self->{output_section} = [ map {ExtUtils::Typemaps::OutputMap->new(%$_) } @output_expr ];
return $self->validate();
}
-package ExtUtils::Typemap::InputMap;
+package ExtUtils::Typemaps::InputMap;
use 5.006001;
use strict;
use warnings;
=head1 NAME
-ExtUtils::Typemap::InputMap - Entry in the INPUT section of a typemap
+ExtUtils::Typemaps::InputMap - Entry in the INPUT section of a typemap
=head1 SYNOPSIS
- use ExtUtils::Typemap;
+ use ExtUtils::Typemaps;
...
my $input = $typemap->get_input_map('T_NV');
my $code = $input->code();
=head1 DESCRIPTION
-Refer to L<ExtUtils::Typemap> for details.
+Refer to L<ExtUtils::Typemaps> for details.
=head1 METHODS
=head1 SEE ALSO
-L<ExtUtils::Typemap>
+L<ExtUtils::Typemaps>
=head1 AUTHOR
-package ExtUtils::Typemap::OutputMap;
+package ExtUtils::Typemaps::OutputMap;
use 5.006001;
use strict;
use warnings;
=head1 NAME
-ExtUtils::Typemap::OutputMap - Entry in the OUTPUT section of a typemap
+ExtUtils::Typemaps::OutputMap - Entry in the OUTPUT section of a typemap
=head1 SYNOPSIS
- use ExtUtils::Typemap;
+ use ExtUtils::Typemaps;
...
my $output = $typemap->get_output_map('T_NV');
my $code = $output->code();
=head1 DESCRIPTION
-Refer to L<ExtUtils::Typemap> for details.
+Refer to L<ExtUtils::Typemaps> for details.
=head1 METHODS
=head1 SEE ALSO
-L<ExtUtils::Typemap>
+L<ExtUtils::Typemaps>
=head1 AUTHOR
-package ExtUtils::Typemap::Type;
+package ExtUtils::Typemaps::Type;
use 5.006001;
use strict;
use warnings;
our $VERSION = '0.05';
use Carp qw(croak);
-use ExtUtils::Typemap;
+use ExtUtils::Typemaps;
=head1 NAME
-ExtUtils::Typemap::Type - Entry in the TYPEMAP section of a typemap
+ExtUtils::Typemaps::Type - Entry in the TYPEMAP section of a typemap
=head1 SYNOPSIS
- use ExtUtils::Typemap;
+ use ExtUtils::Typemaps;
...
my $type = $typemap->get_type_map('char*');
my $input = $typemap->get_input_map($type->xstype);
=head1 DESCRIPTION
-Refer to L<ExtUtils::Typemap> for details.
+Refer to L<ExtUtils::Typemaps> for details.
Object associates C<ctype> with C<xstype>, which is the index
into the in- and output mapping tables.
$self->{xstype} = $args{xstype} if defined $args{xstype};
$self->{ctype} = $args{ctype} if defined $args{ctype};
- $self->{tidy_ctype} = ExtUtils::Typemap::_tidy_type($self->{ctype});
+ $self->{tidy_ctype} = ExtUtils::Typemaps::_tidy_type($self->{ctype});
$self->{proto} = $args{'prototype'} if defined $args{'prototype'};
return $self;
=head1 SEE ALSO
-L<ExtUtils::Typemap>
+L<ExtUtils::Typemaps>
=head1 AUTHOR
ok( $] >= 5.006001, "Your perl is new enough" );
# Does the module load
-use_ok( 'ExtUtils::Typemap' );
+use_ok( 'ExtUtils::Typemaps' );
use warnings;
use Test::More tests => 29;
-use ExtUtils::Typemap;
+use ExtUtils::Typemaps;
# typemap only
SCOPE: {
- my $map = ExtUtils::Typemap->new();
+ my $map = ExtUtils::Typemaps->new();
$map->add_typemap(ctype => 'unsigned int', xstype => 'T_IV');
is($map->as_string(), <<'HERE', "Simple typemap matches expectations");
TYPEMAP
HERE
my $type = $map->get_typemap(ctype => 'unsigned int');
- isa_ok($type, 'ExtUtils::Typemap::Type');
+ isa_ok($type, 'ExtUtils::Typemaps::Type');
is($type->ctype, 'unsigned int');
is($type->xstype, 'T_IV');
is($type->tidy_ctype, 'unsigned int');
# typemap & input
SCOPE: {
- my $map = ExtUtils::Typemap->new();
+ my $map = ExtUtils::Typemaps->new();
$map->add_typemap(ctype => 'unsigned int', xstype => 'T_UV');
$map->add_inputmap(xstype => 'T_UV', code => '$var = ($type)SvUV($arg);');
is($map->as_string(), <<'HERE', "Simple typemap (with input) matches expectations");
HERE
my $type = $map->get_typemap(ctype => 'unsigned int');
- isa_ok($type, 'ExtUtils::Typemap::Type');
+ isa_ok($type, 'ExtUtils::Typemaps::Type');
is($type->ctype, 'unsigned int');
is($type->xstype, 'T_UV');
is($type->tidy_ctype, 'unsigned int');
my $in = $map->get_inputmap(xstype => 'T_UV');
- isa_ok($in, 'ExtUtils::Typemap::InputMap');
+ isa_ok($in, 'ExtUtils::Typemaps::InputMap');
is($in->xstype, 'T_UV');
}
# typemap & output
SCOPE: {
- my $map = ExtUtils::Typemap->new();
+ my $map = ExtUtils::Typemaps->new();
$map->add_typemap(ctype => 'unsigned int', xstype => 'T_UV');
$map->add_outputmap(xstype => 'T_UV', code => 'sv_setuv($arg, (UV)$var);');
is($map->as_string(), <<'HERE', "Simple typemap (with output) matches expectations");
HERE
my $type = $map->get_typemap(ctype => 'unsigned int');
- isa_ok($type, 'ExtUtils::Typemap::Type');
+ isa_ok($type, 'ExtUtils::Typemaps::Type');
is($type->ctype, 'unsigned int');
is($type->xstype, 'T_UV');
is($type->tidy_ctype, 'unsigned int');
my $in = $map->get_outputmap(xstype => 'T_UV');
- isa_ok($in, 'ExtUtils::Typemap::OutputMap');
+ isa_ok($in, 'ExtUtils::Typemaps::OutputMap');
is($in->xstype, 'T_UV');
}
# typemap & input & output
SCOPE: {
- my $map = ExtUtils::Typemap->new();
+ my $map = ExtUtils::Typemaps->new();
$map->add_typemap(ctype => 'unsigned int', xstype => 'T_UV');
$map->add_inputmap(xstype => 'T_UV', code => '$var = ($type)SvUV($arg);');
$map->add_outputmap(xstype => 'T_UV', code => 'sv_setuv($arg, (UV)$var);');
# two typemaps & input & output
SCOPE: {
- my $map = ExtUtils::Typemap->new();
+ my $map = ExtUtils::Typemaps->new();
$map->add_typemap(ctype => 'unsigned int', xstype => 'T_UV');
$map->add_inputmap(xstype => 'T_UV', code => '$var = ($type)SvUV($arg);');
$map->add_outputmap(xstype => 'T_UV', code => 'sv_setuv($arg, (UV)$var);');
sv_setiv($arg, (IV)$var);
HERE
my $type = $map->get_typemap(ctype => 'unsigned int');
- isa_ok($type, 'ExtUtils::Typemap::Type');
+ isa_ok($type, 'ExtUtils::Typemaps::Type');
is($type->ctype, 'unsigned int');
is($type->xstype, 'T_UV');
is($type->tidy_ctype, 'unsigned int');
my $in = $map->get_outputmap(xstype => 'T_UV');
- isa_ok($in, 'ExtUtils::Typemap::OutputMap');
+ isa_ok($in, 'ExtUtils::Typemaps::OutputMap');
is($in->xstype, 'T_UV');
$in = $map->get_outputmap(xstype => 'T_IV');
- isa_ok($in, 'ExtUtils::Typemap::OutputMap');
+ isa_ok($in, 'ExtUtils::Typemaps::OutputMap');
is($in->xstype, 'T_IV');
}
use warnings;
use Test::More tests => 2;
-use ExtUtils::Typemap;
+use ExtUtils::Typemaps;
SCOPE: {
- my $map = ExtUtils::Typemap->new();
+ my $map = ExtUtils::Typemaps->new();
$map->add_typemap(ctype => 'unsigned int', xstype => 'T_UV');
$map->add_inputmap(xstype => 'T_UV', code => ' $var = ($type)SvUV($arg);');
is($map->as_string(), <<'HERE', "Simple typemap (with input and code including leading whitespace) matches expectations");
SCOPE: {
- my $map = ExtUtils::Typemap->new();
+ my $map = ExtUtils::Typemaps->new();
$map->add_typemap(ctype => 'unsigned int', xstype => 'T_UV');
$map->add_inputmap(xstype => 'T_UV', code => " \$var =\n(\$type)\n SvUV(\$arg);");
is($map->as_string(), <<'HERE', "Simple typemap (with input and multi-line code) matches expectations");
use warnings;
use Test::More tests => 6;
-use ExtUtils::Typemap;
+use ExtUtils::Typemaps;
use File::Spec;
use File::Temp;
my $cmp_typemap_file = File::Spec->catfile($datadir, 'simple.typemap');
my $cmp_typemap_str = slurp($cmp_typemap_file);
-my $map = ExtUtils::Typemap->new();
+my $map = ExtUtils::Typemaps->new();
$map->add_typemap(ctype => 'unsigned int', xstype => 'T_UV');
$map->add_inputmap(xstype => 'T_UV', code => '$var = ($type)SvUV($arg);');
$map->add_outputmap(xstype => 'T_UV', code => 'sv_setuv($arg, (UV)$var);');
$map->write(file => $tmpfile);
is($map->as_string(), slurp($tmpfile), "Simple typemap write matches as_string");
-is(ExtUtils::Typemap->new(file => $cmp_typemap_file)->as_string(), $cmp_typemap_str, "Simple typemap roundtrips");
-is(ExtUtils::Typemap->new(file => $tmpfile)->as_string(), $cmp_typemap_str, "Simple typemap roundtrips (2)");
+is(ExtUtils::Typemaps->new(file => $cmp_typemap_file)->as_string(), $cmp_typemap_str, "Simple typemap roundtrips");
+is(ExtUtils::Typemaps->new(file => $tmpfile)->as_string(), $cmp_typemap_str, "Simple typemap roundtrips (2)");
SCOPE: {
local $map->{file} = $cmp_typemap_file;
- is_deeply(ExtUtils::Typemap->new(file => $cmp_typemap_file), $map, "Simple typemap roundtrips (in memory)");
+ is_deeply(ExtUtils::Typemaps->new(file => $cmp_typemap_file), $map, "Simple typemap roundtrips (in memory)");
}
# test that we can also create them from a string
-my $map_from_str = ExtUtils::Typemap->new(string => $map->as_string());
+my $map_from_str = ExtUtils::Typemaps->new(string => $map->as_string());
is_deeply($map_from_str, $map);
use warnings;
use Test::More tests => 5;
-use ExtUtils::Typemap;
+use ExtUtils::Typemaps;
use File::Spec;
use File::Temp;
SCOPE: {
- my $first = ExtUtils::Typemap->new(file => $first_typemap_file);
- isa_ok($first, 'ExtUtils::Typemap');
- my $second = ExtUtils::Typemap->new(file => $second_typemap_file);
- isa_ok($second, 'ExtUtils::Typemap');
+ my $first = ExtUtils::Typemaps->new(file => $first_typemap_file);
+ isa_ok($first, 'ExtUtils::Typemaps');
+ my $second = ExtUtils::Typemaps->new(file => $second_typemap_file);
+ isa_ok($second, 'ExtUtils::Typemaps');
$first->merge(typemap => $second);
}
SCOPE: {
- my $first = ExtUtils::Typemap->new(file => $first_typemap_file);
- isa_ok($first, 'ExtUtils::Typemap');
+ my $first = ExtUtils::Typemaps->new(file => $first_typemap_file);
+ isa_ok($first, 'ExtUtils::Typemaps');
my $second_str = slurp($second_typemap_file);
$first->add_string(string => $second_str);
/ExtUtils/ParseXS.pm
/ExtUtils/ParseXS.pod
/ExtUtils/ParseXS/
+/ExtUtils/Typemaps.pm
+/ExtUtils/Typemaps/
/ExtUtils/testlib.pm
/ExtUtils/xsubpp
/Fatal.pm