diff options
author | Robin Barker <RMBarker@cpan.org> | 2008-01-14 20:39:35 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2008-01-14 22:21:01 +0000 |
commit | 9064044581ce3beb1332f29068a99ae32d4e7992 (patch) | |
tree | ee4bf88bf87fa0b5bf497319270a0013dd847c6c /regexp.h | |
parent | 34f1896bf0e6d84b51034730aeb2a94e83c146ba (diff) | |
download | perl-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.h | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -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) \ ({ \ |