diff options
author | Tony Cook <tony@develop-help.com> | 2022-06-22 14:27:11 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2022-07-18 11:22:08 +1000 |
commit | a8b89476b094f419cd7760635158726263e84631 (patch) | |
tree | 154bf515c5fabbdbb886b7a353e3d57cf028a4b9 /sv.h | |
parent | bda3b19c10a9003a3e7c8c91f6674d892bcc2100 (diff) | |
download | perl-a8b89476b094f419cd7760635158726263e84631.tar.gz |
replace (0+(pointer)) with casts to the pointer type
Old versions (3.3.6) of gcc allowed assignment to such casts, but
this is no longer an issue.
Diffstat (limited to 'sv.h')
-rw-r--r-- | sv.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1398,8 +1398,8 @@ object type. Exposed to perl code via Internals::SvREADONLY(). #ifndef PERL_POISON /* Given that these two are new, there can't be any existing code using them * as LVALUEs, so prevent that from happening */ -# define SvPVX_mutable(sv) (0 + (sv)->sv_u.svu_pv) -# define SvPVX_const(sv) ((const char*)(0 + (sv)->sv_u.svu_pv)) +# define SvPVX_mutable(sv) ((char *)((sv)->sv_u.svu_pv)) +# define SvPVX_const(sv) ((const char*)((sv)->sv_u.svu_pv)) #else /* Except for the poison code, which uses & to scribble over the pointer after free() is called. */ |