diff options
author | Paul Marquess <paul.marquess@btinternet.com> | 2000-12-09 16:47:22 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-12-10 04:17:36 +0000 |
commit | cbc5248d01a71061a57c964b98f44bd4cb3a75c0 (patch) | |
tree | 0169f8eae7194b94bad445862b09d193b30ec79f /ext/SDBM_File | |
parent | b927783ed115112c7a2df385623196331409021a (diff) | |
download | perl-cbc5248d01a71061a57c964b98f44bd4cb3a75c0.tar.gz |
RE: [ID 20001013.009] DB_File issues warning when setting element to undef
Message-ID: <002001c061ff$b3aba820$a20a140a@bfs.phone.com>
p4raw-id: //depot/perl@8068
Diffstat (limited to 'ext/SDBM_File')
-rw-r--r-- | ext/SDBM_File/SDBM_File.pm | 2 | ||||
-rw-r--r-- | ext/SDBM_File/typemap | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/ext/SDBM_File/SDBM_File.pm b/ext/SDBM_File/SDBM_File.pm index b3502b9837..4d1411bf34 100644 --- a/ext/SDBM_File/SDBM_File.pm +++ b/ext/SDBM_File/SDBM_File.pm @@ -6,7 +6,7 @@ require Tie::Hash; use XSLoader (); our @ISA = qw(Tie::Hash); -our $VERSION = "1.02" ; +our $VERSION = "1.03" ; XSLoader::load 'SDBM_File', $VERSION; diff --git a/ext/SDBM_File/typemap b/ext/SDBM_File/typemap index eeb5d59027..40b95f22c0 100644 --- a/ext/SDBM_File/typemap +++ b/ext/SDBM_File/typemap @@ -20,8 +20,14 @@ T_DATUM_K $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; + if (SvOK($arg)) { + $var.dptr = SvPV($arg, PL_na); + $var.dsize = (int)PL_na; + } + else { + $var.dptr = \"\"; + $var.dsize = 0; + } T_GDATUM UNIMPLEMENTED OUTPUT |