Change 32976 by [EMAIL PROTECTED] on 2008/01/14 22:21:01
Subject: [PATCH regexp.h] consting
From: "Robin Barker" <[EMAIL PROTECTED]>
Date: Mon, 14 Jan 2008 20:39:35 -0000
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/regexp.h#134 edit
Differences ...
==== //depot/perl/regexp.h#134 (text) ====
Index: perl/regexp.h
--- perl/regexp.h#133~32962~ 2008-01-11 12:27:23.000000000 -0800
+++ perl/regexp.h 2008-01-14 14:21:01.000000000 -0800
@@ -382,31 +382,31 @@
#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 @@
/* 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) \
({ \
End of Patch.
