From: Robin Barker Date: Mon, 14 Jan 2008 20:39:35 +0000 (+0000) Subject: consting X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9064044581ce3beb1332f29068a99ae32d4e7992;p=p5sagit%2Fp5-mst-13.2.git consting From: "Robin Barker" Message-ID: <46A0F33545E63740BC7563DE59CA9C6D0939CA@exchsvr2.npl.ad.local> p4raw-id: //depot/perl@32976 --- diff --git a/regexp.h b/regexp.h index b09bebd..07fe0b7 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) \ ({ \