diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1996-09-08 00:55:02 +0000 |
---|---|---|
committer | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1996-09-08 00:55:02 +0000 |
commit | 99069129ae4c94e216ce7ad2899e8f92ff47b10c (patch) | |
tree | e47e15693ed4f7a29df27e5521d19f774de09d2c /mg.h | |
parent | 188ea221419ad1211dd551705e8d94114b6df1c5 (diff) | |
download | perl-99069129ae4c94e216ce7ad2899e8f92ff47b10c.tar.gz |
perl 5.003_05: mg.h
Replace the oft-repeated mg_ptr incantation with
the simple MgPVKEY macro.
Rename MgPVKEY to MgPV (to match with HePV elsewhere). Add
additional parens around the "mg".
Diffstat (limited to 'mg.h')
-rw-r--r-- | mg.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -34,3 +34,7 @@ struct magic { #define MgTAINTEDDIR(mg) (mg->mg_flags & MGf_TAINTEDDIR) #define MgTAINTEDDIR_on(mg) (mg->mg_flags |= MGf_TAINTEDDIR) + +#define MgPV(mg) ((mg)->mg_len == HEf_SVKEY) ? \ + SvPV((SV*)((mg)->mg_ptr),na) : \ + (mg)->mg_ptr |