Projects
openEuler:Mainline
perl-ExtUtils-ParseXS
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 9
View file
_service:tar_scm:perl-ExtUtils-ParseXS.spec
Changed
@@ -1,11 +1,11 @@ Name: perl-ExtUtils-ParseXS Epoch: 2 -Version: 3.35 -Release: 2 +Version: 3.44 +Release: 1 Summary: Convert Perl XS code into C code License: GPL+ or Artistic URL: https://metacpan.org/pod/ExtUtils::ParseXS -Source0: https://cpan.metacpan.org/authors/id/S/SM/SMUELLER/ExtUtils-ParseXS-3.35.tar.gz +Source0: https://cpan.metacpan.org/authors/id/X/XS/XSAWYERX/ExtUtils-ParseXS-%{version}.tar.gz BuildArch: noarch BuildRequires: gcc git coreutils make perl-devel perl-generators perl-interpreter perl(Config) @@ -25,7 +25,7 @@ %package_help %prep -%autosetup -n ExtUtils-ParseXS-3.35 -p1 +%autosetup -n ExtUtils-ParseXS-%{version} -p1 %build perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 @@ -41,7 +41,7 @@ make test %files -%doc Changes README +%doc Changes %{_bindir}/* %{perl_vendorlib}/* @@ -50,6 +50,9 @@ %{_mandir}/man3/* %changelog +* Wed Jul 19 2023 leeffo <liweiganga@uniontech.com> - 2:3.44-1 +- upgrade to version 3.44 + * Tue Oct 25 2022 dongyuzhen <dongyuzhen@h-partners.com> - 2:3.35-2 - Rebuild for next release
View file
_service:tar_scm:ExtUtils-ParseXS-3.35.tar.gz/INSTALL
Deleted
@@ -1,14 +0,0 @@ - Installation instructions for ExtUtils::ParseXS - -To install this module, follow the standard steps for installing most -Perl modules: - - perl Makefile.PL - make - make test - make install - -Or you may use the CPAN.pm module, which will automatically execute -these steps for you. - - -Ken
View file
_service:tar_scm:ExtUtils-ParseXS-3.35.tar.gz/README
Deleted
@@ -1,132 +0,0 @@ -NAME - ExtUtils::ParseXS - converts Perl XS code into C code - -SYNOPSIS - use ExtUtils::ParseXS; - - my $pxs = ExtUtils::ParseXS->new; - $pxs->process_file( filename => 'foo.xs' ); - - $pxs->process_file( filename => 'foo.xs', - output => 'bar.c', - 'C++' => 1, - typemap => 'path/to/typemap', - hiertype => 1, - except => 1, - versioncheck => 1, - linenumbers => 1, - optimize => 1, - prototypes => 1, - ); - - # Legacy non-OO interface using a singleton: - use ExtUtils::ParseXS qw(process_file); - process_file( filename => 'foo.xs' ); - -DESCRIPTION - "ExtUtils::ParseXS" will compile XS code into C code by embedding the - constructs necessary to let C functions manipulate Perl values and - creates the glue necessary to let Perl access those functions. The - compiler uses typemaps to determine how to map C function parameters and - variables to Perl values. - - The compiler will search for typemap files called *typemap*. It will use - the following search path to find default typemaps, with the rightmost - typemap taking precedence. - - ../../../typemap:../../typemap:../typemap:typemap - -EXPORT - None by default. "process_file()" and/or "report_error_count()" may be - exported upon request. Using the functional interface is discouraged. - -METHODS - $pxs->new() - Returns a new, empty XS parser/compiler object. - - $pxs->process_file() - This method processes an XS file and sends output to a C file. The - method may be called as a function (this is the legacy interface) - and will then use a singleton as invocant. - - Named parameters control how the processing is done. The following - parameters are accepted: - - C++ Adds "extern "C"" to the C code. Default is false. - - hiertype - Retains "::" in type names so that C++ hierarchical types can be - mapped. Default is false. - - except - Adds exception handling stubs to the C code. Default is false. - - typemap - Indicates that a user-supplied typemap should take precedence - over the default typemaps. A single typemap may be specified as - a string, or multiple typemaps can be specified in an array - reference, with the last typemap having the highest precedence. - - prototypes - Generates prototype code for all xsubs. Default is false. - - versioncheck - Makes sure at run time that the object file (derived from the - ".xs" file) and the ".pm" files have the same version number. - Default is true. - - linenumbers - Adds "#line" directives to the C output so error messages will - look like they came from the original XS file. Default is true. - - optimize - Enables certain optimizations. The only optimization that is - currently affected is the use of *target*s by the output C code - (see perlguts). Not optimizing may significantly slow down the - generated code, but this is the way xsubpp of 5.005 and earlier - operated. Default is to optimize. - - inout - Enable recognition of "IN", "OUT_LIST" and "INOUT_LIST" - declarations. Default is true. - - argtypes - Enable recognition of ANSI-like descriptions of function - signature. Default is true. - - s *Maintainer note:* I have no clue what this does. Strips - function prefixes? - - $pxs->report_error_count() - This method returns the number of a certain kind of errors - encountered during processing of the XS file. - - The method may be called as a function (this is the legacy - interface) and will then use a singleton as invocant. - -AUTHOR - Based on xsubpp code, written by Larry Wall. - - Maintained by: - - * Ken Williams, <ken@mathforum.org> - - * David Golden, <dagolden@cpan.org> - - * James Keenan, <jkeenan@cpan.org> - - * Steffen Mueller, <smueller@cpan.org> - -COPYRIGHT - Copyright 2002-2014 by Ken Williams, David Golden and other - contributors. All rights reserved. - - This library is free software; you can redistribute it and/or modify it - under the same terms as Perl itself. - - Based on the "ExtUtils::xsubpp" code by Larry Wall and the Perl 5 - Porters, which was released under the same license terms. - -SEE ALSO - perl, ExtUtils::xsubpp, ExtUtils::MakeMaker, perlxs, perlxstut. -
View file
_service:tar_scm:ExtUtils-ParseXS-3.35.tar.gz/Changes -> _service:tar_scm:ExtUtils-ParseXS-3.44.tar.gz/Changes
Changed
@@ -1,5 +1,43 @@ Revision history for Perl extension ExtUtils::ParseXS. +3.44 - Thu Jan 6 23:49:25 2022 + - GH #19054: Always XSprePUSH when producing an output list. + - Use more descriptive variable names. + - Fix plan/skip in test file 002-more.t. + +3.43 - Wed Mar 24 15:44:08 2021 CET + - Use PERL_VERSION_LE instead of 5.33+ PERL_VERSION_LT. + - Fix error message bug. + +3.42 - Tue Nov 24 21:42:05 2020 CET + - Restore compatibility with old versions that made use of + "errors" function which was renamed to "report_error_count". + +3.41 - Wed Aug 12 19:39:04 2020 CET + - Use absolute paths in tests on all platforms. + - Use PERL_VERSION compare macro. + +3.40 - Wed Dec 5 05:35:19 2018 CET + - RT #133654: Don't include OUTLIST parameters in the prototype. + +3.39 - Mon Mar 5 17:46:41 2018 CET + - RT #132935: Correctly check VERSIONs. + +3.38 - Fri Feb 9 12:02:34 2018 CET + - Correct name of variable 'ALIAS' (not 'Alias') in documentation. + - Add PERL_REENTRANT for XS modules (get the reentrant versions of + libc functions automatically without declaring as PERL_CORE or + PERL_EXT). + +3.37 - Mon Dec 11 01:54:44 2017 CET + - Update documentation to avoid newGVgen. + +3.36 - Tue Nov 14 09:45:55 2017 CET + - Make generated code avoid warnings about the "items" variable + being unused + - Avoid some unused-variable warnings generated by XS code in the + test suite + 3.35 - Mon Jul 31 17:50:00 CET 2017 - Fix ExtUtils-ParseXS/t/*.t that needed '.' in @INC (David Mitchell) - Remove impediment to compiling under C++11 (Karl Williamson)
View file
_service:tar_scm:ExtUtils-ParseXS-3.35.tar.gz/MANIFEST -> _service:tar_scm:ExtUtils-ParseXS-3.44.tar.gz/MANIFEST
Changed
@@ -1,5 +1,4 @@ Changes -INSTALL lib/ExtUtils/ParseXS.pm lib/ExtUtils/ParseXS.pod lib/ExtUtils/ParseXS/Constants.pm @@ -14,7 +13,6 @@ lib/ExtUtils/xsubpp Makefile.PL MANIFEST This list of files -README t/001-basic.t t/002-more.t t/003-usage.t @@ -56,6 +54,7 @@ t/lib/TypemapTest/Foo.pm t/pseudotypemap1 t/typemap +t/XSBroken.xs t/XSInclude.xsh t/XSMore.xs t/XSTest.pm
View file
_service:tar_scm:ExtUtils-ParseXS-3.35.tar.gz/META.json -> _service:tar_scm:ExtUtils-ParseXS-3.44.tar.gz/META.json
Changed
@@ -4,13 +4,13 @@ "Ken Williams <ken@mathforum.org>" , "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter version 2.150005", + "generated_by" : "ExtUtils::MakeMaker version 7.64, CPAN::Meta::Converter version 2.150010", "license" : "unknown" , "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", - "version" : "2" + "version" : 2 }, "name" : "ExtUtils-ParseXS", "no_index" : { @@ -48,12 +48,13 @@ "release_status" : "stable", "resources" : { "bugtracker" : { - "web" : "http://rt.perl.org/rt3/" + "web" : "https://github.com/Perl/perl5/issues" }, + "homepage" : "https://github.com/Perl/perl5", "repository" : { - "url" : "git://perl5.git.perl.org/gitroot/perl.git" + "url" : "https://github.com/Perl/perl5.git" } }, - "version" : "3.35", - "x_serialization_backend" : "JSON::PP version 2.27300" + "version" : "3.44", + "x_serialization_backend" : "JSON::PP version 4.04" }
View file
_service:tar_scm:ExtUtils-ParseXS-3.35.tar.gz/META.yml -> _service:tar_scm:ExtUtils-ParseXS-3.44.tar.gz/META.yml
Changed
@@ -7,7 +7,7 @@ configure_requires: ExtUtils::MakeMaker: '6.46' dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter version 2.150005' +generated_by: 'ExtUtils::MakeMaker version 7.64, CPAN::Meta::Converter version 2.150010' license: unknown meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -29,7 +29,8 @@ Symbol: '0' Test::More: '0.47' resources: - bugtracker: http://rt.perl.org/rt3/ - repository: git://perl5.git.perl.org/gitroot/perl.git -version: '3.35' + bugtracker: https://github.com/Perl/perl5/issues + homepage: https://github.com/Perl/perl5 + repository: https://github.com/Perl/perl5.git +version: '3.44' x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
View file
_service:tar_scm:ExtUtils-ParseXS-3.35.tar.gz/Makefile.PL -> _service:tar_scm:ExtUtils-ParseXS-3.44.tar.gz/Makefile.PL
Changed
@@ -77,8 +77,9 @@ }, META_MERGE => { resources => { - bugtracker => 'http://rt.perl.org/rt3/', - repository => 'git://perl5.git.perl.org/gitroot/perl.git', + repository => 'https://github.com/Perl/perl5.git', + bugtracker => 'https://github.com/Perl/perl5/issues', + homepage => "https://github.com/Perl/perl5", }, }, ($ >= 5.005 ? ## Add these new keywords supported since 5.005
View file
_service:tar_scm:ExtUtils-ParseXS-3.35.tar.gz/lib/ExtUtils/ParseXS.pm -> _service:tar_scm:ExtUtils-ParseXS-3.44.tar.gz/lib/ExtUtils/ParseXS.pm
Changed
@@ -11,12 +11,12 @@ our $VERSION; BEGIN { - $VERSION = '3.35'; + $VERSION = '3.44'; + require ExtUtils::ParseXS::Constants; ExtUtils::ParseXS::Constants->VERSION($VERSION); + require ExtUtils::ParseXS::CountLines; ExtUtils::ParseXS::CountLines->VERSION($VERSION); + require ExtUtils::ParseXS::Utilities; ExtUtils::ParseXS::Utilities->VERSION($VERSION); + require ExtUtils::ParseXS::Eval; ExtUtils::ParseXS::Eval->VERSION($VERSION); } -use ExtUtils::ParseXS::Constants $VERSION; -use ExtUtils::ParseXS::CountLines $VERSION; -use ExtUtils::ParseXS::Utilities $VERSION; -use ExtUtils::ParseXS::Eval $VERSION; $VERSION = eval $VERSION if $VERSION =~ /_/; use ExtUtils::ParseXS::Utilities qw( @@ -42,6 +42,7 @@ our @EXPORT_OK = qw( process_file report_error_count + errors ); ############################## @@ -467,7 +468,7 @@ $self->{defaults}->{$args$i} = $2; $self->{defaults}->{$args$i} =~ s/"/\\"/g; } - $self->{proto_arg}->$i+1 = '$'; + $self->{proto_arg}->$i+1 = '$' unless $only_C_inlist_ref->{$args$i}; } my $min_args = $num_args - $extra_args; $report_args =~ s/"/\\"/g; @@ -519,9 +520,10 @@ EOF } else { - # cv likely to be unused + # cv and items likely to be unused print Q(<<"EOF"); # PERL_UNUSED_VAR(cv); /* -W */ +# PERL_UNUSED_VAR(items); /* -W */ EOF } @@ -688,10 +690,17 @@ do_push => undef, } ) for grep $self->{in_out}->{$_} =~ /OUT$/, sort keys %{ $self->{in_out} }; - my $prepush_done; + my $outlist_count = @{ $outlist_ref }; + if ($outlist_count) { + my $ext = $outlist_count; + ++$ext if $self->{gotRETVAL} || $wantRETVAL; + print "\tXSprePUSH;"; + print "\tEXTEND(SP,$ext);\n"; + } # all OUTPUT done, so now push the return value on the stack if ($self->{gotRETVAL} && $self->{RETVAL_code}) { print "\t$self->{RETVAL_code}\n"; + print "\t++SP;\n" if $outlist_count; } elsif ($self->{gotRETVAL} || $wantRETVAL) { my $outputmap = $self->{typemap}->get_outputmap( ctype => $self->{ret_type} ); @@ -706,8 +715,9 @@ ); if (not $trgt->{with_size} and $trgt->{type} eq 'p') { # sv_setpv # PUSHp corresponds to sv_setpvn. Treat sv_setpv directly - print "\tsv_setpv(TARG, $what); XSprePUSH; PUSHTARG;\n"; - $prepush_done = 1; + print "\tsv_setpv(TARG, $what);\n"; + print "\tXSprePUSH;\n" unless $outlist_count; + print "\tPUSHTARG;\n"; } else { my $tsize = $trgt->{what_size}; @@ -716,8 +726,8 @@ qq("$tsize"), {var => $var, type => $self->{ret_type}} ); - print "\tXSprePUSH; PUSH$trgt->{type}($what$tsize);\n"; - $prepush_done = 1; + print "\tXSprePUSH;\n" unless $outlist_count; + print "\tPUSH$trgt->{type}($what$tsize);\n"; } } else { @@ -729,15 +739,13 @@ do_setmagic => 0, do_push => undef, } ); + print "\t++SP;\n" if $outlist_count; } } $xsreturn = 1 if $self->{ret_type} ne "void"; my $num = $xsreturn; - my $c = @{ $outlist_ref }; - print "\tXSprePUSH;" if $c and not $prepush_done; - print "\tEXTEND(SP,$c);\n" if $c; - $xsreturn += $c; + $xsreturn += $outlist_count; $self->generate_output( { type => $self->{var_types}->{$_}, num => $num++, @@ -871,6 +879,7 @@ #XS_EUPXS(XS_$self->{Packid}_nil) #{ # dXSARGS; +# PERL_UNUSED_VAR(items); # XSRETURN_EMPTY; #} # @@ -909,7 +918,7 @@ #-Wall: if there is no $self->{Full_func_name} there are no xsubs in this .xs #so 'file' is unused print Q(<<"EOF") if $self->{Full_func_name}; -##if (PERL_REVISION == 5 && PERL_VERSION < 9) +##if PERL_VERSION_LE(5, 8, 999) /* PERL_VERSION_LT is 5.33+ */ # char* file = __FILE__; ##else # const char* file = __FILE__; @@ -952,7 +961,7 @@ print Q(<<"EOF") if ($self->{Overload}); # /* register the overloading (type 'A') magic */ -##if (PERL_REVISION == 5 && PERL_VERSION < 9) +##if PERL_VERSION_LE(5, 8, 999) /* PERL_VERSION_LT is 5.33+ */ # PL_amagic_generation++; ##endif # /* The magic for overload gets a GV* via gv_fetchmeth as */ @@ -1010,6 +1019,7 @@ return $Singleton->{errors}||0; } } +*errors = \&report_error_count; # Input: ($self, $_, @{ $self->{line} }) == unparsed input. # Output: ($_, @{ $self->{line} }) == (rest of line, following lines). @@ -1902,7 +1912,7 @@ my $inputmap = $typemaps->get_inputmap(xstype => $xstype); if (not defined $inputmap) { - $self->blurt("Error: No INPUT definition for type '$type', typekind '" . $type->xstype . "' found"); + $self->blurt("Error: No INPUT definition for type '$type', typekind '$xstype' found"); return; }
View file
_service:tar_scm:ExtUtils-ParseXS-3.35.tar.gz/lib/ExtUtils/ParseXS/Constants.pm -> _service:tar_scm:ExtUtils-ParseXS-3.44.tar.gz/lib/ExtUtils/ParseXS/Constants.pm
Changed
@@ -3,7 +3,7 @@ use warnings; use Symbol; -our $VERSION = '3.35'; +our $VERSION = '3.44'; =head1 NAME
View file
_service:tar_scm:ExtUtils-ParseXS-3.35.tar.gz/lib/ExtUtils/ParseXS/CountLines.pm -> _service:tar_scm:ExtUtils-ParseXS-3.44.tar.gz/lib/ExtUtils/ParseXS/CountLines.pm
Changed
@@ -1,7 +1,7 @@ package ExtUtils::ParseXS::CountLines; use strict; -our $VERSION = '3.35'; +our $VERSION = '3.44'; our $SECTION_END_MARKER;
View file
_service:tar_scm:ExtUtils-ParseXS-3.35.tar.gz/lib/ExtUtils/ParseXS/Eval.pm -> _service:tar_scm:ExtUtils-ParseXS-3.44.tar.gz/lib/ExtUtils/ParseXS/Eval.pm
Changed
@@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '3.35'; +our $VERSION = '3.44'; =head1 NAME @@ -29,7 +29,7 @@ Not all these variables are necessarily considered "public" wrt. use in typemaps, so beware. Variables set up from the ExtUtils::ParseXS object: - $Package $Alias $func_name $Full_func_name $pname + $Package $ALIAS $func_name $Full_func_name $pname Variables set up from C<$other_hashref>: @@ -63,7 +63,7 @@ Not all these variables are necessarily considered "public" wrt. use in typemaps, so beware. Variables set up from the ExtUtils::ParseXS object: - $Package $Alias $func_name $Full_func_name $pname + $Package $ALIAS $func_name $Full_func_name $pname Variables set up from C<$other_hashref>:
View file
_service:tar_scm:ExtUtils-ParseXS-3.35.tar.gz/lib/ExtUtils/ParseXS/Utilities.pm -> _service:tar_scm:ExtUtils-ParseXS-3.44.tar.gz/lib/ExtUtils/ParseXS/Utilities.pm
Changed
@@ -5,7 +5,7 @@ use File::Spec; use ExtUtils::ParseXS::Constants (); -our $VERSION = '3.35'; +our $VERSION = '3.44'; our (@ISA, @EXPORT_OK); @ISA = qw(Exporter);
View file
_service:tar_scm:ExtUtils-ParseXS-3.35.tar.gz/lib/ExtUtils/Typemaps.pm -> _service:tar_scm:ExtUtils-ParseXS-3.44.tar.gz/lib/ExtUtils/Typemaps.pm
Changed
@@ -2,7 +2,7 @@ use 5.006001; use strict; use warnings; -our $VERSION = '3.35'; +our $VERSION = '3.44'; require ExtUtils::ParseXS; require ExtUtils::ParseXS::Constants; @@ -781,7 +781,9 @@ $var.context.value().size()); ', 'T_OUT' => ' { - GV *gv = newGVgen("$Package"); + GV *gv = (GV *)sv_newmortal(); + gv_init_pvn(gv, gv_stashpvs("$Package",1), + "__ANONIO__",10,0); if ( do_open(gv, "+>&", 3, FALSE, 0, 0, $var) ) sv_setsv( $arg,
View file
_service:tar_scm:ExtUtils-ParseXS-3.35.tar.gz/lib/ExtUtils/Typemaps/Cmd.pm -> _service:tar_scm:ExtUtils-ParseXS-3.44.tar.gz/lib/ExtUtils/Typemaps/Cmd.pm
Changed
@@ -2,7 +2,7 @@ use 5.006001; use strict; use warnings; -our $VERSION = '3.35'; +our $VERSION = '3.44'; use ExtUtils::Typemaps;
View file
_service:tar_scm:ExtUtils-ParseXS-3.35.tar.gz/lib/ExtUtils/Typemaps/InputMap.pm -> _service:tar_scm:ExtUtils-ParseXS-3.44.tar.gz/lib/ExtUtils/Typemaps/InputMap.pm
Changed
@@ -2,7 +2,7 @@ use 5.006001; use strict; use warnings; -our $VERSION = '3.35'; +our $VERSION = '3.44'; =head1 NAME
View file
_service:tar_scm:ExtUtils-ParseXS-3.35.tar.gz/lib/ExtUtils/Typemaps/OutputMap.pm -> _service:tar_scm:ExtUtils-ParseXS-3.44.tar.gz/lib/ExtUtils/Typemaps/OutputMap.pm
Changed
@@ -2,7 +2,7 @@ use 5.006001; use strict; use warnings; -our $VERSION = '3.35'; +our $VERSION = '3.44'; =head1 NAME
View file
_service:tar_scm:ExtUtils-ParseXS-3.35.tar.gz/lib/ExtUtils/Typemaps/Type.pm -> _service:tar_scm:ExtUtils-ParseXS-3.44.tar.gz/lib/ExtUtils/Typemaps/Type.pm
Changed
@@ -4,7 +4,7 @@ use warnings; require ExtUtils::Typemaps; -our $VERSION = '3.35'; +our $VERSION = '3.44'; =head1 NAME
View file
_service:tar_scm:ExtUtils-ParseXS-3.35.tar.gz/t/001-basic.t -> _service:tar_scm:ExtUtils-ParseXS-3.44.tar.gz/t/001-basic.t
Changed
@@ -1,10 +1,12 @@ #!/usr/bin/perl use strict; -use Test::More tests => 17; +use Test::More tests => 18; use Config; use DynaLoader; use ExtUtils::CBuilder; +use lib (-d 't' ? File::Spec->catdir(qw(t lib)) : 'lib'); +use PrimitiveCapture; my ($source_file, $obj_file, $lib_file); @@ -15,13 +17,14 @@ use Carp; $SIG{__WARN__} = \&Carp::cluck; -# Some trickery for Android. If we leave @INC as-is, it'll have '.' in it. -# Later on, the 'require XSTest' end up in DynaLoader looking for -# ./PL_XSTest.so, but unless our current directory happens to be in -# LD_LIBRARY_PATH, Android's linker will never find the file, and the test -# will fail. Instead, if we have all absolute paths, it'll just work. -@INC = map { File::Spec->rel2abs($_) } @INC - if $^O =~ /android/; +# The linker on some platforms doesn't like loading libraries using relative +# paths. Android won't find relative paths, and system perl on macOS will +# refuse to load relative paths. The path that DynaLoader uses to load the +# .so or .bundle file is based on the @INC path that the library is loaded +# from. The XSTest module we're using for testing is in the current directory, +# so we need an absolute path in @INC rather than '.'. Just convert all of the +# paths to absolute for simplicity. +@INC = map { File::Spec->rel2abs($_) } @INC; ######################### @@ -177,6 +180,16 @@ } ##################################################################### +{ # third block: broken typemap +my $pxs = ExtUtils::ParseXS->new; +tie *FH, 'Foo'; +my $stderr = PrimitiveCapture::capture_stderr(sub { + $pxs->process_file(filename => 'XSBroken.xs', output => \*FH); +}); +like $stderr, '/No INPUT definition/', "Exercise typemap error"; +} +##################################################################### + sub Foo::TIEHANDLE { bless {}, 'Foo' } sub Foo::PRINT { shift->{buf} .= join '', @_ } sub Foo::content { shift->{buf} }
View file
_service:tar_scm:ExtUtils-ParseXS-3.35.tar.gz/t/002-more.t -> _service:tar_scm:ExtUtils-ParseXS-3.44.tar.gz/t/002-more.t
Changed
@@ -9,7 +9,7 @@ use attributes; use overload; -plan tests => 29; +plan tests => 32; my ($source_file, $obj_file, $lib_file); @@ -22,8 +22,7 @@ use Carp; $SIG{__WARN__} = \&Carp::cluck; # See the comments about this in 001-basics.t -@INC = map { File::Spec->rel2abs($_) } @INC - if $^O =~ /android/; +@INC = map { File::Spec->rel2abs($_) } @INC; ######################### @@ -48,7 +47,7 @@ } SKIP: { - skip "no dynamic loading", 25 + skip "no dynamic loading", 28 if !$b->have_compiler || !$Config{usedl}; my $module = 'XSMore'; $lib_file = $b->link( objects => $obj_file, module_name => $module ); @@ -92,6 +91,15 @@ is_deeply XSMore::outlist(), ord('a'), ord('b'), 'the OUTLIST keyword'; + is_deeply XSMore::outlist_bool("a", "b"), !0, "ab" , + "OUTLIST with a bool RETVAL"; + + is_deeply XSMore::outlist_int("c", "d"), 11, "cd" , + "OUTLIST with an int RETVAL"; + + # eval so compile-time sees any prototype + is_deeply eval 'XSMore::outlist()' , ord('a'), ord('b'), 'OUTLIST prototypes'; + is XSMore::len("foo"), 3, 'the length keyword'; is XSMore::sum(5, 9), 14, 'the INCLUDE_COMMAND directive';
View file
_service:tar_scm:ExtUtils-ParseXS-3.35.tar.gz/t/003-usage.t -> _service:tar_scm:ExtUtils-ParseXS-3.44.tar.gz/t/003-usage.t
Changed
@@ -23,8 +23,7 @@ use Carp; $SIG{__WARN__} = \&Carp::cluck; # See the comments about this in 001-basics.t -@INC = map { File::Spec->rel2abs($_) } @INC - if $^O =~ /android/; +@INC = map { File::Spec->rel2abs($_) } @INC; #########################
View file
_service:tar_scm:ExtUtils-ParseXS-3.44.tar.gz/t/XSBroken.xs
Added
@@ -0,0 +1,26 @@ +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" + +typedef IV MyType3; + +MODULE = XSBroken PACKAGE = XSBroken + +PROTOTYPES: ENABLE + + +TYPEMAP: <<'END' +MyType3 T_BAAR + +OUTPUT +T_BAAR + sv_setiv($arg, (IV)$var); +END + +MyType3 +typemaptest3(foo) + MyType3 foo + CODE: + RETVAL = foo; + OUTPUT: + RETVAL
View file
_service:tar_scm:ExtUtils-ParseXS-3.35.tar.gz/t/XSMore.xs -> _service:tar_scm:ExtUtils-ParseXS-3.44.tar.gz/t/XSMore.xs
Changed
@@ -38,6 +38,36 @@ *b = 'b'; } +STATIC bool +outlist_bool(const char *a, const char *b, char **c) +{ + dTHX; + STRLEN lena = strlen(a); + STRLEN lenb = strlen(b); + STRLEN lenc = lena + lenb; + Newx(*c, lenc+1, char); + strcpy(*c, a); + strcat(*c, b); + SAVEFREEPV(*c); + + return TRUE; +} + +STATIC int +outlist_int(const char *a, const char *b, char **c) +{ + dTHX; + STRLEN lena = strlen(a); + STRLEN lenb = strlen(b); + STRLEN lenc = lena + lenb; + Newx(*c, lenc+1, char); + strcpy(*c, a); + strcat(*c, b); + SAVEFREEPV(*c); + + return 11; +} + STATIC int len(const char* const s, int const l){ PERL_UNUSED_ARG(s); @@ -201,6 +231,12 @@ void outlist(OUTLIST int a, OUTLIST int b) +bool +outlist_bool(const char *a, const char *b, OUTLIST char *c) + +int +outlist_int(const char *a, const char *b, OUTLIST char *c) + int len(char* s, int length(s))
View file
_service:tar_scm:ExtUtils-ParseXS-3.35.tar.gz/t/XSTest.xs -> _service:tar_scm:ExtUtils-ParseXS-3.44.tar.gz/t/XSTest.xs
Changed
@@ -76,6 +76,7 @@ T_BOOL_2(in) bool in CODE: + PERL_UNUSED_VAR(RETVAL); OUTPUT: in void
View file
_service:tar_scm:ExtUtils-ParseXS-3.35.tar.gz/t/XSUsage.xs -> _service:tar_scm:ExtUtils-ParseXS-3.44.tar.gz/t/XSUsage.xs
Changed
@@ -35,6 +35,8 @@ ALIAS: two_x = 1 FOO::two = 2 + INIT: + PERL_UNUSED_VAR(ix); int interface_v_i()
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2