diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-06-08 16:02:54 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-06-08 16:02:54 +0000 |
commit | 01b8bcb77a033a072e6afd95c46cef74d30628c1 (patch) | |
tree | 7ebc9cf04300d652126af3bdb51e2c28e8e9884e /mg.h | |
parent | 8b6b16e72bf4dd30bd09781ad50e9f66fd94440b (diff) | |
download | perl-01b8bcb77a033a072e6afd95c46cef74d30628c1.tar.gz |
Add and use MgPV_nolen_const
p4raw-id: //depot/perl@24761
Diffstat (limited to 'mg.h')
-rw-r--r-- | mg.h | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -48,8 +48,11 @@ struct magic { #define MgPV(mg,lp) ((((int)(lp = (mg)->mg_len)) == HEf_SVKEY) ? \ SvPV((SV*)((mg)->mg_ptr),lp) : \ (mg)->mg_ptr) -#define MgPV_const(mg,lp) ((((int)(lp = (mg)->mg_len)) == HEf_SVKEY) ? \ - SvPV_const((SV*)((mg)->mg_ptr),lp) : \ +#define MgPV_const(mg,lp) ((((int)(lp = (mg)->mg_len)) == HEf_SVKEY) ? \ + SvPV_const((SV*)((mg)->mg_ptr),lp) : \ + (const char*)(mg)->mg_ptr) +#define MgPV_nolen_const(mg) (((((int)(mg)->mg_len)) == HEf_SVKEY) ? \ + SvPV_nolen_const((SV*)((mg)->mg_ptr)) : \ (const char*)(mg)->mg_ptr) #define SvTIED_mg(sv,how) \ |