diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-03-11 18:15:45 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-03-11 18:15:45 +0000 |
commit | 54866b45ebf2e61ddf59cf6687e39cd07dc514b0 (patch) | |
tree | 4c802ff18d55f5cb08a36bde1dda16dd73a9583a /sv.h | |
parent | ab2b559bb5510413385bdf5e5398bcdfb293e40d (diff) | |
download | perl-54866b45ebf2e61ddf59cf6687e39cd07dc514b0.tar.gz |
The 0, in the assert_not_ROK() makes IRIX cc to worry
(cc-1171 cc: WARNING ... The indicated expression has no effect.)
So make the macro to include the , and the non-gcc case empty.
p4raw-id: //depot/perl@18921
Diffstat (limited to 'sv.h')
-rw-r--r-- | sv.h | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -527,17 +527,17 @@ Set the length of the string which is in the SV. See C<SvCUR>. SVp_IOK|SVp_NOK|SVf_IVisUV)) #ifdef __GNUC__ -#define assert_not_ROK(sv) ({assert(!SvROK(sv) || !SvRV(sv))}) +#define assert_not_ROK(sv) ({assert(!SvROK(sv) || !SvRV(sv))}), #else -#define assert_not_ROK(sv) 0 +#define assert_not_ROK(sv) #endif #define SvOK(sv) (SvFLAGS(sv) & SVf_OK) -#define SvOK_off(sv) (assert_not_ROK(sv), \ +#define SvOK_off(sv) (assert_not_ROK(sv) \ SvFLAGS(sv) &= ~(SVf_OK|SVf_AMAGIC| \ SVf_IVisUV|SVf_UTF8), \ SvOOK_off(sv)) -#define SvOK_off_exc_UV(sv) (assert_not_ROK(sv), \ +#define SvOK_off_exc_UV(sv) (assert_not_ROK(sv) \ SvFLAGS(sv) &= ~(SVf_OK|SVf_AMAGIC| \ SVf_UTF8), \ SvOOK_off(sv)) @@ -549,7 +549,7 @@ Set the length of the string which is in the SV. See C<SvCUR>. #define SvNOKp(sv) (SvFLAGS(sv) & SVp_NOK) #define SvNOKp_on(sv) (SvFLAGS(sv) |= SVp_NOK) #define SvPOKp(sv) (SvFLAGS(sv) & SVp_POK) -#define SvPOKp_on(sv) (assert_not_ROK(sv), \ +#define SvPOKp_on(sv) (assert_not_ROK(sv) \ SvFLAGS(sv) |= SVp_POK) #define SvIOK(sv) (SvFLAGS(sv) & SVf_IOK) @@ -600,14 +600,14 @@ and leaves the UTF8 status as it was. #define SvUTF8_off(sv) (SvFLAGS(sv) &= ~(SVf_UTF8)) #define SvPOK(sv) (SvFLAGS(sv) & SVf_POK) -#define SvPOK_on(sv) (assert_not_ROK(sv), \ +#define SvPOK_on(sv) (assert_not_ROK(sv) \ SvFLAGS(sv) |= (SVf_POK|SVp_POK)) #define SvPOK_off(sv) (SvFLAGS(sv) &= ~(SVf_POK|SVp_POK)) -#define SvPOK_only(sv) (assert_not_ROK(sv), \ +#define SvPOK_only(sv) (assert_not_ROK(sv) \ SvFLAGS(sv) &= ~(SVf_OK|SVf_AMAGIC| \ SVf_IVisUV|SVf_UTF8), \ SvFLAGS(sv) |= (SVf_POK|SVp_POK)) -#define SvPOK_only_UTF8(sv) (assert_not_ROK(sv), \ +#define SvPOK_only_UTF8(sv) (assert_not_ROK(sv) \ SvFLAGS(sv) &= ~(SVf_OK|SVf_AMAGIC| \ SVf_IVisUV), \ SvFLAGS(sv) |= (SVf_POK|SVp_POK)) |