summaryrefslogtreecommitdiff
path: root/ext/NDBM_File
diff options
context:
space:
mode:
authorPaul Marquess <paul.marquess@btinternet.com>1999-06-08 23:34:01 +0100
committerGurusamy Sarathy <gsar@cpan.org>1999-07-06 07:04:50 +0000
commite62f7e435fed297897e82caa3159e7f13edf50c2 (patch)
tree782eb394e71eea5093d451c414914d916bb1570e /ext/NDBM_File
parent6520202708b2a849ca8538ed88e0f75376c3b2d7 (diff)
downloadperl-e62f7e435fed297897e82caa3159e7f13edf50c2.tar.gz
DBM Filters
Message-ID: <5104D4DBC598D211B5FE0000F8FE7EB29C6C3B@mbtlipnt02.btlabs.bt.co.uk> p4raw-id: //depot/perl@3603
Diffstat (limited to 'ext/NDBM_File')
-rw-r--r--ext/NDBM_File/NDBM_File.pm2
-rw-r--r--ext/NDBM_File/NDBM_File.xs11
2 files changed, 3 insertions, 10 deletions
diff --git a/ext/NDBM_File/NDBM_File.pm b/ext/NDBM_File/NDBM_File.pm
index cad800adf4..8db59ee03c 100644
--- a/ext/NDBM_File/NDBM_File.pm
+++ b/ext/NDBM_File/NDBM_File.pm
@@ -12,7 +12,7 @@ require DynaLoader;
@ISA = qw(Tie::Hash DynaLoader);
-$VERSION = "1.02";
+$VERSION = "1.03";
bootstrap NDBM_File $VERSION;
diff --git a/ext/NDBM_File/NDBM_File.xs b/ext/NDBM_File/NDBM_File.xs
index 60b141e230..29cc288769 100644
--- a/ext/NDBM_File/NDBM_File.xs
+++ b/ext/NDBM_File/NDBM_File.xs
@@ -117,7 +117,8 @@ ndbm_clearerr(db)
#define setFilter(type) \
{ \
if (db->type) \
- RETVAL = newSVsv(db->type) ; \
+ RETVAL = sv_mortalcopy(db->type) ; \
+ ST(0) = RETVAL ; \
if (db->type && (code == &PL_sv_undef)) { \
SvREFCNT_dec(db->type) ; \
db->type = NULL ; \
@@ -139,8 +140,6 @@ filter_fetch_key(db, code)
SV * RETVAL = &PL_sv_undef ;
CODE:
setFilter(filter_fetch_key) ;
- OUTPUT:
- RETVAL
SV *
filter_store_key(db, code)
@@ -149,8 +148,6 @@ filter_store_key(db, code)
SV * RETVAL = &PL_sv_undef ;
CODE:
setFilter(filter_store_key) ;
- OUTPUT:
- RETVAL
SV *
filter_fetch_value(db, code)
@@ -159,8 +156,6 @@ filter_fetch_value(db, code)
SV * RETVAL = &PL_sv_undef ;
CODE:
setFilter(filter_fetch_value) ;
- OUTPUT:
- RETVAL
SV *
filter_store_value(db, code)
@@ -169,6 +164,4 @@ filter_store_value(db, code)
SV * RETVAL = &PL_sv_undef ;
CODE:
setFilter(filter_store_value) ;
- OUTPUT:
- RETVAL