summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorPaul Marquess <paul.marquess@btinternet.com>2000-12-09 16:47:22 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-12-10 04:17:36 +0000
commitcbc5248d01a71061a57c964b98f44bd4cb3a75c0 (patch)
tree0169f8eae7194b94bad445862b09d193b30ec79f /ext
parentb927783ed115112c7a2df385623196331409021a (diff)
downloadperl-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')
-rw-r--r--ext/DB_File/typemap6
-rw-r--r--ext/GDBM_File/GDBM_File.pm2
-rw-r--r--ext/GDBM_File/typemap10
-rw-r--r--ext/NDBM_File/NDBM_File.pm2
-rw-r--r--ext/NDBM_File/typemap10
-rw-r--r--ext/ODBM_File/ODBM_File.pm2
-rw-r--r--ext/ODBM_File/typemap10
-rw-r--r--ext/SDBM_File/SDBM_File.pm2
-rw-r--r--ext/SDBM_File/typemap10
9 files changed, 40 insertions, 14 deletions
diff --git a/ext/DB_File/typemap b/ext/DB_File/typemap
index 41a24f4a86..b244e53158 100644
--- a/ext/DB_File/typemap
+++ b/ext/DB_File/typemap
@@ -29,8 +29,10 @@ T_dbtkeydatum
T_dbtdatum
ckFilter($arg, filter_store_value, \"filter_store_value\");
DBT_clear($var) ;
- $var.data = SvPV($arg, PL_na);
- $var.size = (int)PL_na;
+ if (SvOK($arg)) {
+ $var.data = SvPV($arg, PL_na);
+ $var.size = (int)PL_na;
+ }
OUTPUT
diff --git a/ext/GDBM_File/GDBM_File.pm b/ext/GDBM_File/GDBM_File.pm
index ab866eecab..fe87dd0856 100644
--- a/ext/GDBM_File/GDBM_File.pm
+++ b/ext/GDBM_File/GDBM_File.pm
@@ -59,7 +59,7 @@ use XSLoader ();
GDBM_WRITER
);
-$VERSION = "1.03";
+$VERSION = "1.04";
sub AUTOLOAD {
my($constname);
diff --git a/ext/GDBM_File/typemap b/ext/GDBM_File/typemap
index 4f79ae3e32..1dd063003a 100644
--- a/ext/GDBM_File/typemap
+++ b/ext/GDBM_File/typemap
@@ -19,8 +19,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;
+ }
OUTPUT
T_DATUM_K
output_datum(aTHX_ $arg, $var.dptr, $var.dsize);
diff --git a/ext/NDBM_File/NDBM_File.pm b/ext/NDBM_File/NDBM_File.pm
index c9ef6993a8..99aae17d5c 100644
--- a/ext/NDBM_File/NDBM_File.pm
+++ b/ext/NDBM_File/NDBM_File.pm
@@ -10,7 +10,7 @@ require Tie::Hash;
use XSLoader ();
our @ISA = qw(Tie::Hash);
-our $VERSION = "1.03";
+our $VERSION = "1.04";
XSLoader::load 'NDBM_File', $VERSION;
diff --git a/ext/NDBM_File/typemap b/ext/NDBM_File/typemap
index eeb5d59027..40b95f22c0 100644
--- a/ext/NDBM_File/typemap
+++ b/ext/NDBM_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
diff --git a/ext/ODBM_File/ODBM_File.pm b/ext/ODBM_File/ODBM_File.pm
index 732ed60930..4244eb966f 100644
--- a/ext/ODBM_File/ODBM_File.pm
+++ b/ext/ODBM_File/ODBM_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 'ODBM_File', $VERSION;
diff --git a/ext/ODBM_File/typemap b/ext/ODBM_File/typemap
index 7c23815ec7..096427ea7f 100644
--- a/ext/ODBM_File/typemap
+++ b/ext/ODBM_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
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