From: Nicholas Clark <nick@ccl4.org>
Date: Mon, 11 Feb 2008 14:46:40 +0000 (+0000)
Subject: In Perl_regfree_internal(), rx is actually not NULL.
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8074533a0c1d5639d1b58108552f1c023528a4a2;p=p5sagit%2Fp5-mst-13.2.git

In Perl_regfree_internal(), rx is actually not NULL.
In Perl_regnext(), p can actually be NULL.

p4raw-id: //depot/perl@33279
---

diff --git a/embed.fnc b/embed.fnc
index f4d6633..6e1736b 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -688,7 +688,7 @@ Ap	|I32	|pregexec	|NN REGEXP * const prog|NN char* stringarg \
 Ap	|void	|pregfree	|NULLOK REGEXP* r
 Ap	|void	|pregfree2	|NN REGEXP* prog
 EXp	|REGEXP*|reg_temp_copy	|NN REGEXP* r
-Ap	|void	|regfree_internal|NULLOK REGEXP * const r
+Ap	|void	|regfree_internal|NN REGEXP * const rx
 #if defined(USE_ITHREADS)
 Ap	|void*	|regdupe_internal|NN REGEXP * const r|NN CLONE_PARAMS* param
 #endif
@@ -701,7 +701,7 @@ Ap	|SV*	|re_intuit_string|NN REGEXP * const rx
 Ap	|I32	|regexec_flags	|NN REGEXP * const rx|NN char* stringarg \
 				|NN char* strend|NN char* strbeg|I32 minend \
 				|NN SV* screamer|NULLOK void* data|U32 flags
-ApR	|regnode*|regnext	|NN regnode* p
+ApR	|regnode*|regnext	|NULLOK regnode* p
 
 EXp |SV*|reg_named_buff          |NN REGEXP * const rx|NULLOK SV * const key \
                                  |NULLOK SV * const value|const U32 flags
diff --git a/proto.h b/proto.h
index e3222ae..ebdd866 100644
--- a/proto.h
+++ b/proto.h
@@ -1863,7 +1863,9 @@ PERL_CALLCONV void	Perl_pregfree2(pTHX_ REGEXP* prog)
 PERL_CALLCONV REGEXP*	Perl_reg_temp_copy(pTHX_ REGEXP* r)
 			__attribute__nonnull__(pTHX_1);
 
-PERL_CALLCONV void	Perl_regfree_internal(pTHX_ REGEXP * const r);
+PERL_CALLCONV void	Perl_regfree_internal(pTHX_ REGEXP * const rx)
+			__attribute__nonnull__(pTHX_1);
+
 #if defined(USE_ITHREADS)
 PERL_CALLCONV void*	Perl_regdupe_internal(pTHX_ REGEXP * const r, CLONE_PARAMS* param)
 			__attribute__nonnull__(pTHX_1)
@@ -1892,8 +1894,7 @@ PERL_CALLCONV I32	Perl_regexec_flags(pTHX_ REGEXP * const rx, char* stringarg, c
 			__attribute__nonnull__(pTHX_6);
 
 PERL_CALLCONV regnode*	Perl_regnext(pTHX_ regnode* p)
-			__attribute__warn_unused_result__
-			__attribute__nonnull__(pTHX_1);
+			__attribute__warn_unused_result__;
 
 
 PERL_CALLCONV SV*	Perl_reg_named_buff(pTHX_ REGEXP * const rx, SV * const key, SV * const value, const U32 flags)