[Pcre-svn] [433] code/trunk: For regexec(), if pmatch is NUL…

Página Inicial
Delete this message
Autor: Subversion repository
Data:  
Para: pcre-svn
Assunto: [Pcre-svn] [433] code/trunk: For regexec(), if pmatch is NULL, force nmatch to be zero .
Revision: 433
          http://vcs.pcre.org/viewvc?view=rev&revision=433
Author:   ph10
Date:     2009-09-02 17:09:13 +0100 (Wed, 02 Sep 2009)


Log Message:
-----------
For regexec(), if pmatch is NULL, force nmatch to be zero.

Modified Paths:
--------------
    code/trunk/ChangeLog
    code/trunk/doc/pcreposix.3


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2009-09-02 16:02:56 UTC (rev 432)
+++ code/trunk/ChangeLog    2009-09-02 16:09:13 UTC (rev 433)
@@ -86,8 +86,12 @@
 15. Added REG_UNGREEDY to the pcreposix interface, at the request of a user.
     It maps to PCRE_UNGREEDY. It is not, of course, POSIX-compatible, but it
     is not the first non-POSIX option to be added. Clearly some people find 
-    these options useful.  
+    these options useful.


+16. If a caller to the POSIX matching function regexec() passes a non-zero 
+    value for \fInmatch\fP with a NULL value for \fIpmatch\fP, the value of
+    \fInmatch\fP is forced to zero. 
+    


Version 7.9 11-Apr-09
---------------------

Modified: code/trunk/doc/pcreposix.3
===================================================================
--- code/trunk/doc/pcreposix.3    2009-09-02 16:02:56 UTC (rev 432)
+++ code/trunk/doc/pcreposix.3    2009-09-02 16:09:13 UTC (rev 433)
@@ -206,6 +206,9 @@
 strings is returned. The \fInmatch\fP and \fIpmatch\fP arguments of
 \fBregexec()\fP are ignored.
 .P
+If the value of \fInmatch\fP is zero, or if the value \fIpmatch\fP is NULL,
+no data about any matched strings is returned.
+.P
 Otherwise,the portion of the string that was matched, and also any captured
 substrings, are returned via the \fIpmatch\fP argument, which points to an
 array of \fInmatch\fP structures of type \fIregmatch_t\fP, containing the