diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-04-20 13:54:26 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-04-20 13:54:26 +0000 |
commit | 9bafe73e6740256c7233414e16e001000131384c (patch) | |
tree | a62e78fc139d728107856bd896bf098f7d7a3562 /hv.h | |
parent | 5f5ae4a7c00fa8527fbc1cf66da85ee1690fc1a7 (diff) | |
download | perl-9bafe73e6740256c7233414e16e001000131384c.tar.gz |
A little bit more safe version of HvMROMETA
p4raw-id: //depot/perl@30994
Diffstat (limited to 'hv.h')
-rw-r--r-- | hv.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -266,7 +266,9 @@ C<SV*>. #define HvRITER_get(hv) (SvOOK(hv) ? HvAUX(hv)->xhv_riter : -1) #define HvEITER_get(hv) (SvOOK(hv) ? HvAUX(hv)->xhv_eiter : 0) #define HvNAME(hv) HvNAME_get(hv) -#define HvMROMETA(hv) (HvAUX(hv)->xhv_mro_meta ? HvAUX(hv)->xhv_mro_meta : mro_meta_init(hv)) +#define HvMROMETA(hv) (SvOOK(hv) \ + ? (HvAUX(hv)->xhv_mro_meta ? HvAUX(hv)->xhv_mro_meta : mro_meta_init(hv)) \ + : NULL) /* FIXME - all of these should use a UTF8 aware API, which should also involve getting the length. */ /* This macro may go away without notice. */ |