This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
75a8281
)
Storable: switch to using SvPVCLEAR()
author
Yves Orton
<demerphq@gmail.com>
Wed, 19 Oct 2016 08:55:40 +0000
(10:55 +0200)
committer
Yves Orton
<demerphq@gmail.com>
Wed, 19 Oct 2016 11:28:00 +0000
(13:28 +0200)
dist/Storable/Storable.xs
patch
|
blob
|
blame
|
history
diff --git
a/dist/Storable/Storable.xs
b/dist/Storable/Storable.xs
index
a5f8ecd
..
053951c
100644
(file)
--- a/
dist/Storable/Storable.xs
+++ b/
dist/Storable/Storable.xs
@@
-4894,7
+4894,7
@@
static SV *retrieve_lscalar(pTHX_ stcxt_t *cxt, const char *cname)
SEEN_NN(sv, stash, 0); /* Associate this new scalar with tag "tagnum" */
if (len == 0) {
-
sv_setpvs(sv, ""
);
+
SvPVCLEAR(sv
);
return sv;
}
@@
-5684,7
+5684,7
@@
static SV *retrieve_code(pTHX_ stcxt_t *cxt, const char *cname)
SAVETMPS;
errsv = get_sv("@", GV_ADD);
-
sv_setpvs(errsv, "");
/* clear $@ */
+
SvPVCLEAR(errsv);
/* clear $@ */
if (SvROK(cxt->eval) && SvTYPE(SvRV(cxt->eval)) == SVt_PVCV) {
PUSHMARK(sp);
XPUSHs(sv_2mortal(newSVsv(sub)));