diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-08-22 18:11:33 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-08-22 18:11:33 -0700 |
commit | 4451054581ed5cb7c84863b6788f41b7c689b99d (patch) | |
tree | 429dabe3aa61e0d89d03ee85d4739dab5171f4ab /pad.h | |
parent | 7581b055f139e45e9f153aec81f967886db8c2d3 (diff) | |
download | perl-4451054581ed5cb7c84863b6788f41b7c689b99d.tar.gz |
pad.h: Let PADNAME_PV return null
Diffstat (limited to 'pad.h')
-rw-r--r-- | pad.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -207,7 +207,8 @@ The C array of pad entries. The index of the last pad entry. =for apidoc Amx|char *|PADNAME_PV|PADNAME pn -The name stored in the pad name struct. +The name stored in the pad name struct. This returns NULL for a target or +GV slot. =for apidoc Amx|STRLEN|PADNAME_LEN|PADNAME pn The length of the name. @@ -286,7 +287,7 @@ Restore the old pad saved into the local variable opad by PAD_SAVE_LOCAL() #define PAD_ARRAY(pad) AvARRAY(pad) #define PAD_MAX(pad) AvFILLp(pad) -#define PADNAME_PV(pn) SvPV_nolen(pn) +#define PADNAME_PV(pn) (SvPOKp(pn) ? SvPVX(pn) : NULL) #define PADNAME_LEN(pn) SvCUR(pn) #define PADNAME_UTF8(pn) !!SvUTF8(pn) #define PADNAME_SV(pn) pn |