diff options
author | Tony Cook <tony@develop-help.com> | 2021-03-18 14:37:01 +1100 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2022-10-26 11:11:08 +0200 |
commit | a73e2f42e4d90aabd3c1f9b45b5b18fab652e36e (patch) | |
tree | a49777fb3f48fdde784a7b68b567053ed91c2379 /cop.h | |
parent | ee05e6d8953bcb0842d59e3379842b4df6929b1a (diff) | |
download | perl-a73e2f42e4d90aabd3c1f9b45b5b18fab652e36e.tar.gz |
op.c - copy cop_features to the COP inserted into the OP tree
All current features are compile-time, so this hasn't been an issue,
but my current implementation of the autovivification issue checks
features at runtime, which failed to work correctly if non-bundle
features were set.
This commit fixes things so that run-time default-on features also work
properly, by setting each COP's cop_features to the value of the bits
set at the COP's compile time - ie the same approach as cop_hints.
Diffstat (limited to 'cop.h')
-rw-r--r-- | cop.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -558,6 +558,8 @@ string C<p>, creating the package if necessary. #define CopHINTHASH_get(c) ((COPHH*)((c)->cop_hints_hash)) #define CopHINTHASH_set(c,h) ((c)->cop_hints_hash = (h)) +#define CopFEATURES_setfrom(dst, src) ((dst)->cop_features = (src)->cop_features) + /* =for apidoc Am|SV *|cop_hints_fetch_pv |const COP *cop|const char *key |U32 hash|U32 flags =for apidoc_item|SV *|cop_hints_fetch_pvn|const COP *cop|const char *key|STRLEN keylen|U32 hash|U32 flags |