From: Nicholas Clark Date: Mon, 7 Jan 2008 13:53:57 +0000 (+0000) Subject: ReREFCNT_inc() should return a pointer to REGEXP. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b7e0bd9e800e06ac92e4d24efd91bf8739281a2f;p=p5sagit%2Fp5-mst-13.2.git ReREFCNT_inc() should return a pointer to REGEXP. [I don't get warnings about void context here, but I'm sure someone will :-(] p4raw-id: //depot/perl@32890 --- diff --git a/regexp.h b/regexp.h index 7696ec2..b41c0a4 100644 --- a/regexp.h +++ b/regexp.h @@ -437,7 +437,7 @@ and check for NULL. ({ \ /* This is here to generate a casting warning if incorrect. */ \ REGEXP *const zwapp = (re); \ - SvREFCNT_inc(zwapp); \ + (REGEXP *) SvREFCNT_inc(zwapp); \ }) # define ReREFCNT_dec(re) \ ({ \ @@ -447,7 +447,7 @@ and check for NULL. }) #else # define ReREFCNT_dec(re) SvREFCNT_dec(re) -# define ReREFCNT_inc(re) SvREFCNT_inc(re) +# define ReREFCNT_inc(re) ((REGEXP *) SvREFCNT_inc(re)) #endif /* FIXME for plugins. */