summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/ExtUtils/xsubpp
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlperl/lib/ExtUtils/xsubpp')
-rw-r--r--Master/tlpkg/tlperl/lib/ExtUtils/xsubpp31
1 files changed, 21 insertions, 10 deletions
diff --git a/Master/tlpkg/tlperl/lib/ExtUtils/xsubpp b/Master/tlpkg/tlperl/lib/ExtUtils/xsubpp
index fa0cd50426a..e2ac71a3234 100644
--- a/Master/tlpkg/tlperl/lib/ExtUtils/xsubpp
+++ b/Master/tlpkg/tlperl/lib/ExtUtils/xsubpp
@@ -3,12 +3,6 @@ use 5.006;
use strict;
eval {
require ExtUtils::ParseXS;
- ExtUtils::ParseXS->import(
- qw(
- process_file
- report_error_count
- )
- );
1;
}
or do {
@@ -22,7 +16,7 @@ use Getopt::Long;
my %args = ();
-my $usage = "Usage: xsubpp [-v] [-csuffix csuffix] [-except] [-prototypes] [-noversioncheck] [-nolinenumbers] [-nooptimize] [-noinout] [-noargtypes] [-s pattern] [-typemap typemap]... file.xs\n";
+my $usage = "Usage: xsubpp [-v] [-csuffix csuffix] [-except] [-prototypes] [-noversioncheck] [-nolinenumbers] [-nooptimize] [-noinout] [-noargtypes] [-strip|s pattern] [-typemap typemap]... file.xs\n";
Getopt::Long::Configure qw(no_auto_abbrev no_ignore_case);
@@ -39,7 +33,7 @@ GetOptions(\%args, qw(hiertype!
v
typemap=s@
output=s
- s=s
+ s|strip=s
csuffix=s
))
or die $usage;
@@ -53,8 +47,9 @@ if ($args{v}) {
$args{filename} = shift @ARGV;
-process_file(%args);
-exit( report_error_count() ? 1 : 0 );
+my $pxs = ExtUtils::ParseXS->new;
+$pxs->process_file(%args);
+exit( $pxs->report_error_count() ? 1 : 0 );
__END__
@@ -150,6 +145,22 @@ Currently doesn't do anything at all. This flag has been a no-op for
many versions of perl, at least as far back as perl5.003_07. It's
allowed here for backwards compatibility.
+=item B<-s=...> or B<-strip=...>
+
+I<This option is obscure and discouraged.>
+
+If specified, the given string will be stripped off from the beginning
+of the C function name in the generated XS functions (if it starts with that prefix).
+This only applies to XSUBs without C<CODE> or C<PPCODE> blocks.
+For example, the XS:
+
+ void foo_bar(int i);
+
+when C<xsubpp> is invoked with C<-s foo_> will install a C<foo_bar>
+function in Perl, but really call C<bar(i)> in C. Most of the time,
+this is the opposite of what you want and failure modes are somewhat
+obscure, so please avoid this option where possible.
+
=back
=head1 ENVIRONMENT