diff options
author | 2000-04-06 17:03:22 +0000 | |
---|---|---|
committer | 2000-04-06 17:03:22 +0000 | |
commit | e2e5c5d36e4398ba94879f0a31b0307421edcfdb (patch) | |
tree | 15b8472335eac9359a0b196bf3480d422401d8ff /gnu/usr.bin/perl/ext/GDBM_File | |
parent | only call get_random_bytes() once in m_pad() (diff) | |
download | wireguard-openbsd-e2e5c5d36e4398ba94879f0a31b0307421edcfdb.tar.xz wireguard-openbsd-e2e5c5d36e4398ba94879f0a31b0307421edcfdb.zip |
perl-5.6.0 + local changes
Diffstat (limited to 'gnu/usr.bin/perl/ext/GDBM_File')
-rw-r--r-- | gnu/usr.bin/perl/ext/GDBM_File/GDBM_File.pm | 14 | ||||
-rw-r--r-- | gnu/usr.bin/perl/ext/GDBM_File/typemap | 23 |
2 files changed, 21 insertions, 16 deletions
diff --git a/gnu/usr.bin/perl/ext/GDBM_File/GDBM_File.pm b/gnu/usr.bin/perl/ext/GDBM_File/GDBM_File.pm index 09df4373fb6..ab866eecabe 100644 --- a/gnu/usr.bin/perl/ext/GDBM_File/GDBM_File.pm +++ b/gnu/usr.bin/perl/ext/GDBM_File/GDBM_File.pm @@ -33,21 +33,21 @@ The available functions and the gdbm/perl interface need to be documented. =head1 SEE ALSO -L<perl(1)>, L<DB_File(3)>. +L<perl(1)>, L<DB_File(3)>, L<perldbmfilter>. =cut package GDBM_File; use strict; -use vars qw($VERSION @ISA @EXPORT $AUTOLOAD); +our($VERSION, @ISA, @EXPORT, $AUTOLOAD); require Carp; require Tie::Hash; require Exporter; use AutoLoader; -require DynaLoader; -@ISA = qw(Tie::Hash Exporter DynaLoader); +use XSLoader (); +@ISA = qw(Tie::Hash Exporter); @EXPORT = qw( GDBM_CACHESIZE GDBM_FAST @@ -59,14 +59,14 @@ require DynaLoader; GDBM_WRITER ); -$VERSION = "1.00"; +$VERSION = "1.03"; sub AUTOLOAD { my($constname); ($constname = $AUTOLOAD) =~ s/.*:://; my $val = constant($constname, @_ ? $_[0] : 0); if ($! != 0) { - if ($! =~ /Invalid/) { + if ($! =~ /Invalid/ || $!{EINVAL}) { $AutoLoader::AUTOLOAD = $AUTOLOAD; goto &AutoLoader::AUTOLOAD; } @@ -78,7 +78,7 @@ sub AUTOLOAD { goto &$AUTOLOAD; } -bootstrap GDBM_File $VERSION; +XSLoader::load 'GDBM_File', $VERSION; # Preloaded methods go here. Autoload methods go after __END__, and are # processed by the autosplit program. diff --git a/gnu/usr.bin/perl/ext/GDBM_File/typemap b/gnu/usr.bin/perl/ext/GDBM_File/typemap index 317a8f3886c..4f79ae3e32a 100644 --- a/gnu/usr.bin/perl/ext/GDBM_File/typemap +++ b/gnu/usr.bin/perl/ext/GDBM_File/typemap @@ -2,8 +2,8 @@ #################################### DBM SECTION # -datum T_DATUM -gdatum T_GDATUM +datum_key T_DATUM_K +datum_value T_DATUM_V NDBM_File T_PTROBJ GDBM_File T_PTROBJ SDBM_File T_PTROBJ @@ -13,15 +13,20 @@ DBZ_File T_PTROBJ FATALFUNC T_OPAQUEPTR INPUT -T_DATUM +T_DATUM_K + ckFilter($arg, filter_store_key, \"filter_store_key\"); + $var.dptr = SvPV($arg, PL_na); + $var.dsize = (int)PL_na; +T_DATUM_V + ckFilter($arg, filter_store_value, \"filter_store_value\"); $var.dptr = SvPV($arg, PL_na); $var.dsize = (int)PL_na; -T_GDATUM - UNIMPLEMENTED OUTPUT -T_DATUM - sv_setpvn($arg, $var.dptr, $var.dsize); -T_GDATUM - sv_usepvn($arg, $var.dptr, $var.dsize); +T_DATUM_K + output_datum(aTHX_ $arg, $var.dptr, $var.dsize); + ckFilter($arg, filter_fetch_key,\"filter_fetch_key\"); +T_DATUM_V + output_datum(aTHX_ $arg, $var.dptr, $var.dsize); + ckFilter($arg, filter_fetch_value,\"filter_fetch_value\"); T_PTROBJ sv_setref_pv($arg, dbtype, (void*)$var); |