diff options
author | Nicholas Clark <nick@ccl4.org> | 2013-01-18 11:32:44 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2013-03-19 11:53:19 +0100 |
commit | 5a4ca00e1ae70ead90d5ddb57d6bf189a749ae9c (patch) | |
tree | 3a27a582f1532d8e87d7a91f0073deb67328269a /embed.h | |
parent | b8989050d30609050cd38eb5df7c4142da5f63bf (diff) | |
download | perl-5a4ca00e1ae70ead90d5ddb57d6bf189a749ae9c.tar.gz |
In S_regclass(), create listsv as a mortal, claiming a reference if needed.
The SV listsv is sometimes stored in an array generated near the end of
S_regclass(). In other cases it is not used, and it needs to be freed if
any of the warnings that S_regclass() can trigger turn out to be fatal.
The simplest solution to this problem is to declare it from the start as a
mortal, and claim a (new) reference to it if it is *not* to be freed. This
permits the removal of all other code related to ensuring that it is freed
at the right time, but not freed prematurely if a call to a warning returns.
Diffstat (limited to 'embed.h')
-rw-r--r-- | embed.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -943,7 +943,7 @@ #define reginsert(a,b,c,d) S_reginsert(aTHX_ a,b,c,d) #define regpatws S_regpatws #define regpiece(a,b,c) S_regpiece(aTHX_ a,b,c) -#define regpposixcc(a,b,c,d) S_regpposixcc(aTHX_ a,b,c,d) +#define regpposixcc(a,b,c) S_regpposixcc(aTHX_ a,b,c) #define regtail(a,b,c,d) S_regtail(aTHX_ a,b,c,d) #define reguni(a,b,c) S_reguni(aTHX_ a,b,c) #define regwhite S_regwhite |