diff options
Diffstat (limited to 'ext/NDBM_File/NDBM_File.xs')
-rw-r--r-- | ext/NDBM_File/NDBM_File.xs | 11 |
1 files changed, 2 insertions, 9 deletions
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 |