summaryrefslogtreecommitdiff
path: root/regexp.h
diff options
context:
space:
mode:
authorRobin Barker <RMBarker@cpan.org>2008-01-14 20:39:35 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2008-01-14 22:21:01 +0000
commit9064044581ce3beb1332f29068a99ae32d4e7992 (patch)
treeee4bf88bf87fa0b5bf497319270a0013dd847c6c /regexp.h
parent34f1896bf0e6d84b51034730aeb2a94e83c146ba (diff)
downloadperl-9064044581ce3beb1332f29068a99ae32d4e7992.tar.gz
consting
From: "Robin Barker" <Robin.Barker@npl.co.uk> Message-ID: <46A0F33545E63740BC7563DE59CA9C6D0939CA@exchsvr2.npl.ad.local> p4raw-id: //depot/perl@32976
Diffstat (limited to 'regexp.h')
-rw-r--r--regexp.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/regexp.h b/regexp.h
index b09bebdfd1..07fe0b72dd 100644
--- a/regexp.h
+++ b/regexp.h
@@ -382,31 +382,31 @@ and check for NULL.
#if defined(__GNUC__) && !defined(__STRICT_ANSI__) && !defined(PERL_GCC_PEDANTIC)
# define RX_EXTFLAGS(prog) \
(*({ \
- REGEXP *const thwape = (prog); \
+ const REGEXP *const thwape = (prog); \
assert(SvTYPE(thwape) == SVt_REGEXP); \
&RXp_EXTFLAGS(SvANY(thwape)); \
}))
# define RX_ENGINE(prog) \
(*({ \
- REGEXP *const thwape = (prog); \
+ const REGEXP *const thwape = (prog); \
assert(SvTYPE(thwape) == SVt_REGEXP); \
&SvANY(thwape)->engine; \
}))
# define RX_SUBBEG(prog) \
(*({ \
- REGEXP *const thwape = (prog); \
+ const REGEXP *const thwape = (prog); \
assert(SvTYPE(thwape) == SVt_REGEXP); \
&SvANY(thwape)->subbeg; \
}))
# define RX_OFFS(prog) \
(*({ \
- REGEXP *const thwape = (prog); \
+ const REGEXP *const thwape = (prog); \
assert(SvTYPE(thwape) == SVt_REGEXP); \
&SvANY(thwape)->offs; \
}))
# define RX_NPARENS(prog) \
(*({ \
- REGEXP *const thwape = (prog); \
+ const REGEXP *const thwape = (prog); \
assert(SvTYPE(thwape) == SVt_REGEXP); \
&SvANY(thwape)->nparens; \
}))
@@ -470,7 +470,8 @@ and check for NULL.
/* This is here to generate a casting warning if incorrect. */ \
REGEXP *const zwapp = (re); \
assert(SvTYPE(zwapp) == SVt_REGEXP); \
- (REGEXP *) SvREFCNT_inc(zwapp); \
+ SvREFCNT_inc(zwapp); \
+ zwapp; \
})
# define ReREFCNT_dec(re) \
({ \