diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-06-07 18:32:44 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-06-07 18:32:44 +0000 |
commit | fa28a6c6f7e8f9e40914ce7c0e4bd1cf2100f380 (patch) | |
tree | 0a9cffb0a55bdc08e3970e55925472227542947e /mg.h | |
parent | 832658c4bf34b93b5e24e5e1ff81cc2458c91a5c (diff) | |
download | perl-fa28a6c6f7e8f9e40914ce7c0e4bd1cf2100f380.tar.gz |
Add MgPV_const
p4raw-id: //depot/perl@24738
Diffstat (limited to 'mg.h')
-rw-r--r-- | mg.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -48,6 +48,9 @@ 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) : \ + (const char*)(mg)->mg_ptr) #define SvTIED_mg(sv,how) \ (SvRMAGICAL(sv) ? mg_find((sv),(how)) : Null(MAGIC*)) |