void
vfill(SV *sv, SV *ss, SV *sl, SV *sf)
+PROTOTYPE: $$$$
PREINIT:
size_t s, l, n, o;
char f, *v;
void
vcopy(SV *sf, SV *sfs, SV *st, SV *sts, SV *sl)
+PROTOTYPE: $$$$$
PREINIT:
size_t fs, ts, l, lf = 0, n, o;
char *t, *f;
SV *
veq(SV *sv1, SV *ss1, SV *sv2, SV *ss2, SV *sl)
+PROTOTYPE: $$$$$
PREINIT:
size_t s1, s2, l, o, n;
char *v1, *v2;
return 1;
}
-sub vfill_pp {
+sub vfill_pp ($$$$) {
(undef, my $s, my $l, my $x) = @_;
croak "Invalid argument" unless _alldef @_;
return unless $l;
=cut
-sub vcopy_pp {
+sub vcopy_pp ($$$$$) {
my ($fs, $ts, $l) = @_[1, 3, 4];
croak "Invalid argument" unless _alldef @_;
return unless $l;
=cut
-sub vshift {
+sub vshift ($$$$;$) {
my ($start, $length, $bits, $insert) = @_[1 .. 4];
return unless $bits;
my $left = 1;
=cut
-sub vrot {
+sub vrot ($$$$) {
my ($start, $length, $bits) = @_[1 .. 3];
return unless $length and $bits;
my $left = 1;
=cut
-sub veq_pp {
+sub veq_pp ($$$$$) {
my ($s1, $s2, $l) = @_[1, 3, 4];
croak "Invalid argument" unless _alldef @_;
my $i = 0;
use strict;
use warnings;
-use Test::More tests => 6;
+use Test::More tests => 2 * 7;
require Scalar::Vec::Util;
-for (qw/vfill vcopy vshift veq SVU_PP SVU_SIZE/) {
+my %syms = (
+ vfill => '$$$$',
+ vcopy => '$$$$$',
+ veq => '$$$$$',
+ vshift => '$$$$;$',
+ vrot => '$$$$',
+ SVU_PP => '',
+ SVU_SIZE => '',
+);
+
+for (keys %syms) {
eval { Scalar::Vec::Util->import($_) };
- ok(!$@, 'import ' . $_);
+ is $@, '', "import $_";
+ is prototype($_), $syms{$_}, "prototype $_";
}