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
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[perl #96126] Allocate CvFILE more simply
[perl5.git]
/
universal.c
diff --git
a/universal.c
b/universal.c
index
c891b54
..
76702ff
100644
(file)
--- a/
universal.c
+++ b/
universal.c
@@
-1293,8
+1293,13
@@
Perl_boot_core_UNIVERSAL(pTHX)
PL_amagic_generation++;
/* Providing a Regexp::DESTROY fixes #21347. See test in t/op/ref.t */
PL_amagic_generation++;
/* Providing a Regexp::DESTROY fixes #21347. See test in t/op/ref.t */
- CvFILE(newCONSTSUB(get_hv("Regexp::", GV_ADD), "DESTROY", NULL))
- = (char *)file;
+ {
+ CV * const cv =
+ newCONSTSUB(get_hv("Regexp::", GV_ADD), "DESTROY", NULL);
+ Safefree(CvFILE(cv));
+ CvFILE(cv) = (char *)file;
+ CvDYNFILE_off(cv);
+ }
}
/*
}
/*