diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-11-27 22:30:54 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-11-30 11:48:42 -0800 |
commit | 0f94cb1fe27e58a59d3391214dab34037ab184db (patch) | |
tree | 00f43fa153a153b7e2a1d1728b6a9880264fa132 /proto.h | |
parent | b19cb98db58c735b4237857f7f69fd857d61934a (diff) | |
download | perl-0f94cb1fe27e58a59d3391214dab34037ab184db.tar.gz |
[perl #123223] Make PADNAME a separate type
distinct from SV. This should fix the CPAN modules that were failing
when the PadnameLVALUE flag was added, because it shared the same
bit as SVs_OBJECT and pad names were going through code paths not
designed to handle pad names.
Unfortunately, it will probably break other CPAN modules, but I think
this change is for the better, as it makes both pad names and SVs sim-
pler and makes pad names take less memory.
Diffstat (limited to 'proto.h')
-rw-r--r-- | proto.h | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -2985,6 +2985,20 @@ PERL_CALLCONV PADNAMELIST * Perl_newPADNAMELIST(pTHX_ size_t max) __attribute__malloc__ __attribute__warn_unused_result__; +PERL_CALLCONV PADNAME * Perl_newPADNAMEouter(pTHX_ PADNAME *outer) + __attribute__malloc__ + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_NEWPADNAMEOUTER \ + assert(outer) + +PERL_CALLCONV PADNAME * Perl_newPADNAMEpvn(pTHX_ const char *s, STRLEN len) + __attribute__malloc__ + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_NEWPADNAMEPVN \ + assert(s) + PERL_CALLCONV OP* Perl_newPMOP(pTHX_ I32 type, I32 flags) __attribute__malloc__ __attribute__warn_unused_result__; @@ -3353,6 +3367,11 @@ PERL_CALLCONV PAD ** Perl_padlist_store(pTHX_ PADLIST *padlist, I32 key, PAD *va #define PERL_ARGS_ASSERT_PADLIST_STORE \ assert(padlist) +PERL_CALLCONV void Perl_padname_free(pTHX_ PADNAME *pn) + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_PADNAME_FREE \ + assert(pn) + PERL_CALLCONV PADNAME * Perl_padnamelist_fetch(pTHX_ PADNAMELIST *pnl, SSize_t key) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); @@ -8038,6 +8057,13 @@ PERL_CALLCONV PADLIST * Perl_padlist_dup(pTHX_ PADLIST *srcpad, CLONE_PARAMS *pa #define PERL_ARGS_ASSERT_PADLIST_DUP \ assert(srcpad); assert(param) +PERL_CALLCONV PADNAME * Perl_padname_dup(pTHX_ PADNAME *src, CLONE_PARAMS *param) + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_PADNAME_DUP \ + assert(src); assert(param) + PERL_CALLCONV PADNAMELIST * Perl_padnamelist_dup(pTHX_ PADNAMELIST *srcpad, CLONE_PARAMS *param) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) |