[Pcre-svn] [171] code/trunk: (1) uint32_t for substring numb…

トップ ページ
このメッセージを削除
著者: Subversion repository
日付:  
To: pcre-svn
題目: [Pcre-svn] [171] code/trunk: (1) uint32_t for substring number args; (2) correct PRIV( memctl_malloc)
Revision: 171
          http://www.exim.org/viewvc/pcre2?view=rev&revision=171
Author:   ph10
Date:     2014-12-01 16:14:53 +0000 (Mon, 01 Dec 2014)


Log Message:
-----------
(1) uint32_t for substring number args; (2) correct PRIV(memctl_malloc)
definition for Windows; (3) remove unwanted PCRE2_EXP_DATA_DEFN; (4)
documentation updates.

Modified Paths:
--------------
    code/trunk/configure.ac
    code/trunk/doc/html/pcre2_pattern_info.html
    code/trunk/doc/html/pcre2_substring_copy_bynumber.html
    code/trunk/doc/html/pcre2_substring_get_bynumber.html
    code/trunk/doc/html/pcre2_substring_length_bynumber.html
    code/trunk/doc/html/pcre2api.html
    code/trunk/doc/pcre2.txt
    code/trunk/doc/pcre2_pattern_info.3
    code/trunk/doc/pcre2_substring_copy_bynumber.3
    code/trunk/doc/pcre2_substring_get_bynumber.3
    code/trunk/doc/pcre2_substring_length_bynumber.3
    code/trunk/doc/pcre2api.3
    code/trunk/src/pcre2.h.in
    code/trunk/src/pcre2_context.c
    code/trunk/src/pcre2_internal.h
    code/trunk/src/pcre2_substring.c


Modified: code/trunk/configure.ac
===================================================================
--- code/trunk/configure.ac    2014-11-30 10:05:41 UTC (rev 170)
+++ code/trunk/configure.ac    2014-12-01 16:14:53 UTC (rev 171)
@@ -10,7 +10,7 @@


m4_define(pcre2_major, [10])
m4_define(pcre2_minor, [00])
-m4_define(pcre2_prerelease, [-RC1])
+m4_define(pcre2_prerelease, [-RC2])
m4_define(pcre2_date, [2014-11-28])

# NOTE: The CMakeLists.txt file searches for the above variables in the first

Modified: code/trunk/doc/html/pcre2_pattern_info.html
===================================================================
--- code/trunk/doc/html/pcre2_pattern_info.html    2014-11-30 10:05:41 UTC (rev 170)
+++ code/trunk/doc/html/pcre2_pattern_info.html    2014-12-01 16:14:53 UTC (rev 171)
@@ -27,19 +27,19 @@
 <P>
 This function returns information about a compiled pattern. Its arguments are:
 <pre>
-  <i>code</i>                      Compiled regular expression
-  <i>what</i>                      What information is required
-  <i>where</i>                     Where to put the information
+  <i>code</i>     Pointer to a compiled regular expression
+  <i>what</i>     What information is required
+  <i>where</i>    Where to put the information
 </pre>
-If <i>where</i> is NULL, the function returns the amount of memory needed for
-the requested information, in bytes. The following information is available:
+The recognized values for the <i>what</i> argument, and the information they
+request are as follows:
 <pre>
   PCRE2_INFO_ALLOPTIONS      Final options after compiling
   PCRE2_INFO_ARGOPTIONS      Options passed to <b>pcre2_compile()</b>
   PCRE2_INFO_BACKREFMAX      Number of highest back reference
-  PCRE2_INFO_BSR             What \R matches
-                               0 all Unicode line endings
-                               1 CR, LF, or CRLF only
+  PCRE2_INFO_BSR             What \R matches:
+                               PCRE2_BSR_UNICODE: Unicode line endings
+                               PCRE2_BSR_ANYCRLF: CR, LF, or CRLF only
   PCRE2_INFO_CAPTURECOUNT    Number of capturing subpatterns
   PCRE2_INFO_FIRSTBITMAP     Bitmap of first code units, or NULL
   PCRE2_INFO_FIRSTCODEUNIT   First code unit when type is 1
@@ -58,7 +58,7 @@
   PCRE2_INFO_MATCHEMPTY      1 if the pattern can match an
                                empty string, 0 otherwise
   PCRE2_INFO_MATCHLIMIT      Match limit if set,
-                               otherwise PCRE2_RROR_UNSET
+                               otherwise PCRE2_ERROR_UNSET
   PCRE2_INFO_MAXLOOKBEHIND   Length (in characters) of the longest
                                lookbehind assertion
   PCRE2_INFO_MINLENGTH       Lower bound length of matching strings
@@ -66,17 +66,20 @@
   PCRE2_INFO_NAMECOUNT       Number of named subpatterns
   PCRE2_INFO_NAMETABLE       Pointer to name table
   PCRE2_CONFIG_NEWLINE       Code for the newline sequence:
-                               1    for CR
-                               2    for LF
-                               3    for CRLF
-                               4    for ANY
-                               5    for ANYCRLF
+                               PCRE2_NEWLINE_CR
+                               PCRE2_NEWLINE_LF
+                               PCRE2_NEWLINE_CRLF
+                               PCRE2_NEWLINE_ANY
+                               PCRE2_NEWLINE_ANYCRLF
   PCRE2_INFO_RECURSIONLIMIT  Recursion limit if set,
                                otherwise PCRE2_ERROR_UNSET
   PCRE2_INFO_SIZE            Size of compiled pattern
 </pre>
-The <i>where</i> argument must point to an unsigned 32-bit integer (uint32_t
-variable), except for the following <i>what</i> values:
+If <i>where</i> is NULL, the function returns the amount of memory needed for
+the requested information, in bytes. Otherwise, the <i>where</i> argument must
+point to an unsigned 32-bit integer (uint32_t variable), except for the
+following <i>what</i> values, when it must point to a variable of the type
+shown:
 <pre>
   PCRE2_INFO_FIRSTBITMAP     const uint8_t *
   PCRE2_INFO_JITSIZE         size_t


Modified: code/trunk/doc/html/pcre2_substring_copy_bynumber.html
===================================================================
--- code/trunk/doc/html/pcre2_substring_copy_bynumber.html    2014-11-30 10:05:41 UTC (rev 170)
+++ code/trunk/doc/html/pcre2_substring_copy_bynumber.html    2014-12-01 16:14:53 UTC (rev 171)
@@ -20,7 +20,7 @@
 </P>
 <P>
 <b>int pcre2_substring_copy_bynumber(pcre2_match_data *<i>match_data</i>,</b>
-<b>  unsigned int <i>number</i>, PCRE2_UCHAR *<i>buffer</i>,</b>
+<b>  uint32_t <i>number</i>, PCRE2_UCHAR *<i>buffer</i>,</b>
 <b>  PCRE2_SIZE *<i>bufflen</i>);</b>
 </P>
 <br><b>


Modified: code/trunk/doc/html/pcre2_substring_get_bynumber.html
===================================================================
--- code/trunk/doc/html/pcre2_substring_get_bynumber.html    2014-11-30 10:05:41 UTC (rev 170)
+++ code/trunk/doc/html/pcre2_substring_get_bynumber.html    2014-12-01 16:14:53 UTC (rev 171)
@@ -20,14 +20,14 @@
 </P>
 <P>
 <b>int pcre2_substring_get_bynumber(pcre2_match_data *<i>match_data</i>,</b>
-<b>  unsigned int <i>number</i>, PCRE2_UCHAR **<i>bufferptr</i>, PCRE2_SIZE *<i>bufflen</i>);</b>
+<b>  uint32_t <i>number</i>, PCRE2_UCHAR **<i>bufferptr</i>, PCRE2_SIZE *<i>bufflen</i>);</b>
 </P>
 <br><b>
 DESCRIPTION
 </b><br>
 <P>
-This is a convenience function for extracting a captured substring by number into
-newly acquired memory. The arguments are:
+This is a convenience function for extracting a captured substring by number
+into newly acquired memory. The arguments are:
 <pre>
   <i>match_data</i>    The match data for the match
   <i>number</i>        Number of the required substring


Modified: code/trunk/doc/html/pcre2_substring_length_bynumber.html
===================================================================
--- code/trunk/doc/html/pcre2_substring_length_bynumber.html    2014-11-30 10:05:41 UTC (rev 170)
+++ code/trunk/doc/html/pcre2_substring_length_bynumber.html    2014-12-01 16:14:53 UTC (rev 171)
@@ -20,7 +20,7 @@
 </P>
 <P>
 <b>int pcre2_substring_length_bynumber(pcre2_match_data *<i>match_data</i>,</b>
-<b>  unsigned int <i>number</i>, PCRE2_SIZE *<i>length</i>);</b>
+<b>  uint32_t <i>number</i>, PCRE2_SIZE *<i>length</i>);</b>
 </P>
 <br><b>
 DESCRIPTION


Modified: code/trunk/doc/html/pcre2api.html
===================================================================
--- code/trunk/doc/html/pcre2api.html    2014-11-30 10:05:41 UTC (rev 170)
+++ code/trunk/doc/html/pcre2api.html    2014-12-01 16:14:53 UTC (rev 171)
@@ -189,7 +189,7 @@
 <br>
 <br>
 <b>int pcre2_substring_copy_bynumber(pcre2_match_data *<i>match_data</i>,</b>
-<b>  unsigned int <i>number</i>, PCRE2_UCHAR *<i>buffer</i>,</b>
+<b>  uint32_t <i>number</i>, PCRE2_UCHAR *<i>buffer</i>,</b>
 <b>  PCRE2_SIZE *<i>bufflen</i>);</b>
 <br>
 <br>
@@ -201,7 +201,7 @@
 <br>
 <br>
 <b>int pcre2_substring_get_bynumber(pcre2_match_data *<i>match_data</i>,</b>
-<b>  unsigned int <i>number</i>, PCRE2_UCHAR **<i>bufferptr</i>,</b>
+<b>  uint32_t <i>number</i>, PCRE2_UCHAR **<i>bufferptr</i>,</b>
 <b>  PCRE2_SIZE *<i>bufflen</i>);</b>
 <br>
 <br>
@@ -210,7 +210,7 @@
 <br>
 <br>
 <b>int pcre2_substring_length_bynumber(pcre2_match_data *<i>match_data</i>,</b>
-<b>  unsigned int <i>number</i>, PCRE2_SIZE *<i>length</i>);</b>
+<b>  uint32_t <i>number</i>, PCRE2_SIZE *<i>length</i>);</b>
 <br>
 <br>
 <b>int pcre2_substring_nametable_scan(const pcre2_code *<i>code</i>,</b>
@@ -2214,16 +2214,16 @@
 <br><a name="SEC28" href="#TOC1">EXTRACTING CAPTURED SUBSTRINGS BY NUMBER</a><br>
 <P>
 <b>int pcre2_substring_length_bynumber(pcre2_match_data *<i>match_data</i>,</b>
-<b>  unsigned int <i>number</i>, PCRE2_SIZE *<i>length</i>);</b>
+<b>  uint32_t <i>number</i>, PCRE2_SIZE *<i>length</i>);</b>
 <br>
 <br>
 <b>int pcre2_substring_copy_bynumber(pcre2_match_data *<i>match_data</i>,</b>
-<b>  unsigned int <i>number</i>, PCRE2_UCHAR *<i>buffer</i>,</b>
+<b>  uint32_t <i>number</i>, PCRE2_UCHAR *<i>buffer</i>,</b>
 <b>  PCRE2_SIZE *<i>bufflen</i>);</b>
 <br>
 <br>
 <b>int pcre2_substring_get_bynumber(pcre2_match_data *<i>match_data</i>,</b>
-<b>  unsigned int <i>number</i>, PCRE2_UCHAR **<i>bufferptr</i>,</b>
+<b>  uint32_t <i>number</i>, PCRE2_UCHAR **<i>bufferptr</i>,</b>
 <b>  PCRE2_SIZE *<i>bufflen</i>);</b>
 <br>
 <br>
@@ -2685,7 +2685,7 @@
 </P>
 <br><a name="SEC37" href="#TOC1">REVISION</a><br>
 <P>
-Last updated: 27 November 2014
+Last updated: 01 December 2014
 <br>
 Copyright &copy; 1997-2014 University of Cambridge.
 <br>


Modified: code/trunk/doc/pcre2.txt
===================================================================
--- code/trunk/doc/pcre2.txt    2014-11-30 10:05:41 UTC (rev 170)
+++ code/trunk/doc/pcre2.txt    2014-12-01 16:14:53 UTC (rev 171)
@@ -283,7 +283,7 @@
          PCRE2_SPTR name, PCRE2_UCHAR *buffer, PCRE2_SIZE *bufflen);


        int pcre2_substring_copy_bynumber(pcre2_match_data *match_data,
-         unsigned int number, PCRE2_UCHAR *buffer,
+         uint32_t number, PCRE2_UCHAR *buffer,
          PCRE2_SIZE *bufflen);


        void pcre2_substring_free(PCRE2_UCHAR *buffer);
@@ -292,14 +292,14 @@
          PCRE2_SPTR name, PCRE2_UCHAR **bufferptr, PCRE2_SIZE *bufflen);


        int pcre2_substring_get_bynumber(pcre2_match_data *match_data,
-         unsigned int number, PCRE2_UCHAR **bufferptr,
+         uint32_t number, PCRE2_UCHAR **bufferptr,
          PCRE2_SIZE *bufflen);


        int pcre2_substring_length_byname(pcre2_match_data *match_data,
          PCRE2_SPTR name, PCRE2_SIZE *length);


        int pcre2_substring_length_bynumber(pcre2_match_data *match_data,
-         unsigned int number, PCRE2_SIZE *length);
+         uint32_t number, PCRE2_SIZE *length);


        int pcre2_substring_nametable_scan(const pcre2_code *code,
          PCRE2_SPTR name, PCRE2_SPTR *first, PCRE2_SPTR *last);
@@ -2189,14 +2189,14 @@
 EXTRACTING CAPTURED SUBSTRINGS BY NUMBER


        int pcre2_substring_length_bynumber(pcre2_match_data *match_data,
-         unsigned int number, PCRE2_SIZE *length);
+         uint32_t number, PCRE2_SIZE *length);


        int pcre2_substring_copy_bynumber(pcre2_match_data *match_data,
-         unsigned int number, PCRE2_UCHAR *buffer,
+         uint32_t number, PCRE2_UCHAR *buffer,
          PCRE2_SIZE *bufflen);


        int pcre2_substring_get_bynumber(pcre2_match_data *match_data,
-         unsigned int number, PCRE2_UCHAR **bufferptr,
+         uint32_t number, PCRE2_UCHAR **bufferptr,
          PCRE2_SIZE *bufflen);


        void pcre2_substring_free(PCRE2_UCHAR *buffer);
@@ -2624,7 +2624,7 @@


REVISION

-       Last updated: 27 November 2014
+       Last updated: 01 December 2014
        Copyright (c) 1997-2014 University of Cambridge.
 ------------------------------------------------------------------------------



Modified: code/trunk/doc/pcre2_pattern_info.3
===================================================================
--- code/trunk/doc/pcre2_pattern_info.3    2014-11-30 10:05:41 UTC (rev 170)
+++ code/trunk/doc/pcre2_pattern_info.3    2014-12-01 16:14:53 UTC (rev 171)
@@ -1,4 +1,4 @@
-.TH PCRE2_PATTERN_INFO 3 "21 October 2014" "PCRE2 10.00"
+.TH PCRE2_PATTERN_INFO 3 "01 December 2014" "PCRE2 10.00"
 .SH NAME
 PCRE2 - Perl-compatible regular expressions (revised API)
 .SH SYNOPSIS
@@ -15,19 +15,19 @@
 .sp
 This function returns information about a compiled pattern. Its arguments are:
 .sp
-  \fIcode\fP                      Compiled regular expression
-  \fIwhat\fP                      What information is required
-  \fIwhere\fP                     Where to put the information
+  \fIcode\fP     Pointer to a compiled regular expression
+  \fIwhat\fP     What information is required
+  \fIwhere\fP    Where to put the information
 .sp
-If \fIwhere\fP is NULL, the function returns the amount of memory needed for
-the requested information, in bytes. The following information is available:
+The recognized values for the \fIwhat\fP argument, and the information they
+request are as follows:
 .sp
   PCRE2_INFO_ALLOPTIONS      Final options after compiling
   PCRE2_INFO_ARGOPTIONS      Options passed to \fBpcre2_compile()\fP
   PCRE2_INFO_BACKREFMAX      Number of highest back reference
-  PCRE2_INFO_BSR             What \eR matches
-                               0 all Unicode line endings
-                               1 CR, LF, or CRLF only
+  PCRE2_INFO_BSR             What \eR matches:
+                               PCRE2_BSR_UNICODE: Unicode line endings
+                               PCRE2_BSR_ANYCRLF: CR, LF, or CRLF only
   PCRE2_INFO_CAPTURECOUNT    Number of capturing subpatterns
   PCRE2_INFO_FIRSTBITMAP     Bitmap of first code units, or NULL
   PCRE2_INFO_FIRSTCODEUNIT   First code unit when type is 1
@@ -46,7 +46,7 @@
   PCRE2_INFO_MATCHEMPTY      1 if the pattern can match an
                                empty string, 0 otherwise
   PCRE2_INFO_MATCHLIMIT      Match limit if set,
-                               otherwise PCRE2_RROR_UNSET
+                               otherwise PCRE2_ERROR_UNSET
   PCRE2_INFO_MAXLOOKBEHIND   Length (in characters) of the longest
                                lookbehind assertion
   PCRE2_INFO_MINLENGTH       Lower bound length of matching strings
@@ -54,17 +54,20 @@
   PCRE2_INFO_NAMECOUNT       Number of named subpatterns
   PCRE2_INFO_NAMETABLE       Pointer to name table
   PCRE2_CONFIG_NEWLINE       Code for the newline sequence:
-                               1    for CR
-                               2    for LF
-                               3    for CRLF
-                               4    for ANY
-                               5    for ANYCRLF
+                               PCRE2_NEWLINE_CR
+                               PCRE2_NEWLINE_LF
+                               PCRE2_NEWLINE_CRLF
+                               PCRE2_NEWLINE_ANY
+                               PCRE2_NEWLINE_ANYCRLF
   PCRE2_INFO_RECURSIONLIMIT  Recursion limit if set,
                                otherwise PCRE2_ERROR_UNSET
   PCRE2_INFO_SIZE            Size of compiled pattern
 .sp
-The \fIwhere\fP argument must point to an unsigned 32-bit integer (uint32_t
-variable), except for the following \fIwhat\fP values:
+If \fIwhere\fP is NULL, the function returns the amount of memory needed for
+the requested information, in bytes. Otherwise, the \fIwhere\fP argument must
+point to an unsigned 32-bit integer (uint32_t variable), except for the
+following \fIwhat\fP values, when it must point to a variable of the type
+shown:
 .sp
   PCRE2_INFO_FIRSTBITMAP     const uint8_t *
   PCRE2_INFO_JITSIZE         size_t


Modified: code/trunk/doc/pcre2_substring_copy_bynumber.3
===================================================================
--- code/trunk/doc/pcre2_substring_copy_bynumber.3    2014-11-30 10:05:41 UTC (rev 170)
+++ code/trunk/doc/pcre2_substring_copy_bynumber.3    2014-12-01 16:14:53 UTC (rev 171)
@@ -1,4 +1,4 @@
-.TH PCRE2_SUBSTRING_COPY_BYNUMBER 3 "21 October 2014" "PCRE2 10.00"
+.TH PCRE2_SUBSTRING_COPY_BYNUMBER 3 "01 December 2014" "PCRE2 10.00"
 .SH NAME
 PCRE2 - Perl-compatible regular expressions (revised API)
 .SH SYNOPSIS
@@ -8,7 +8,7 @@
 .PP
 .nf
 .B int pcre2_substring_copy_bynumber(pcre2_match_data *\fImatch_data\fP,
-.B "  unsigned int \fInumber\fP, PCRE2_UCHAR *\fIbuffer\fP,"
+.B "  uint32_t \fInumber\fP, PCRE2_UCHAR *\fIbuffer\fP,"
 .B "  PCRE2_SIZE *\fIbufflen\fP);"
 .fi
 .


Modified: code/trunk/doc/pcre2_substring_get_bynumber.3
===================================================================
--- code/trunk/doc/pcre2_substring_get_bynumber.3    2014-11-30 10:05:41 UTC (rev 170)
+++ code/trunk/doc/pcre2_substring_get_bynumber.3    2014-12-01 16:14:53 UTC (rev 171)
@@ -1,4 +1,4 @@
-.TH PCRE2_SUBSTRING_GET_BYNUMBER 3 "21 October 2014" "PCRE2 10.00"
+.TH PCRE2_SUBSTRING_GET_BYNUMBER 3 "01 December 2014" "PCRE2 10.00"
 .SH NAME
 PCRE2 - Perl-compatible regular expressions (revised API)
 .SH SYNOPSIS
@@ -8,14 +8,14 @@
 .PP
 .nf
 .B int pcre2_substring_get_bynumber(pcre2_match_data *\fImatch_data\fP,
-.B "  unsigned int \fInumber\fP, PCRE2_UCHAR **\fIbufferptr\fP, PCRE2_SIZE *\fIbufflen\fP);"
+.B "  uint32_t \fInumber\fP, PCRE2_UCHAR **\fIbufferptr\fP, PCRE2_SIZE *\fIbufflen\fP);"
 .fi
 .
 .SH DESCRIPTION
 .rs
 .sp
-This is a convenience function for extracting a captured substring by number into
-newly acquired memory. The arguments are:
+This is a convenience function for extracting a captured substring by number
+into newly acquired memory. The arguments are:
 .sp
   \fImatch_data\fP    The match data for the match
   \fInumber\fP        Number of the required substring


Modified: code/trunk/doc/pcre2_substring_length_bynumber.3
===================================================================
--- code/trunk/doc/pcre2_substring_length_bynumber.3    2014-11-30 10:05:41 UTC (rev 170)
+++ code/trunk/doc/pcre2_substring_length_bynumber.3    2014-12-01 16:14:53 UTC (rev 171)
@@ -1,4 +1,4 @@
-.TH PCRE2_SUBSTRING_LENGTH_BYNUMBER 3 "21 October 2014" "PCRE2 10.00"
+.TH PCRE2_SUBSTRING_LENGTH_BYNUMBER 3 "01 December 2014" "PCRE2 10.00"
 .SH NAME
 PCRE2 - Perl-compatible regular expressions (revised API)
 .SH SYNOPSIS
@@ -8,7 +8,7 @@
 .PP
 .nf
 .B int pcre2_substring_length_bynumber(pcre2_match_data *\fImatch_data\fP,
-.B "  unsigned int \fInumber\fP, PCRE2_SIZE *\fIlength\fP);"
+.B "  uint32_t \fInumber\fP, PCRE2_SIZE *\fIlength\fP);"
 .fi
 .
 .SH DESCRIPTION


Modified: code/trunk/doc/pcre2api.3
===================================================================
--- code/trunk/doc/pcre2api.3    2014-11-30 10:05:41 UTC (rev 170)
+++ code/trunk/doc/pcre2api.3    2014-12-01 16:14:53 UTC (rev 171)
@@ -1,4 +1,4 @@
-.TH PCRE2API 3 "27 November 2014" "PCRE2 10.00"
+.TH PCRE2API 3 "01 December 2014" "PCRE2 10.00"
 .SH NAME
 PCRE2 - Perl-compatible regular expressions (revised API)
 .sp
@@ -138,7 +138,7 @@
 .B "  PCRE2_SPTR \fIname\fP, PCRE2_UCHAR *\fIbuffer\fP, PCRE2_SIZE *\fIbufflen\fP);"
 .sp
 .B int pcre2_substring_copy_bynumber(pcre2_match_data *\fImatch_data\fP,
-.B "  unsigned int \fInumber\fP, PCRE2_UCHAR *\fIbuffer\fP,"
+.B "  uint32_t \fInumber\fP, PCRE2_UCHAR *\fIbuffer\fP,"
 .B "  PCRE2_SIZE *\fIbufflen\fP);"
 .sp
 .B void pcre2_substring_free(PCRE2_UCHAR *\fIbuffer\fP);
@@ -147,14 +147,14 @@
 .B "  PCRE2_SPTR \fIname\fP, PCRE2_UCHAR **\fIbufferptr\fP, PCRE2_SIZE *\fIbufflen\fP);"
 .sp
 .B int pcre2_substring_get_bynumber(pcre2_match_data *\fImatch_data\fP,
-.B "  unsigned int \fInumber\fP, PCRE2_UCHAR **\fIbufferptr\fP,"
+.B "  uint32_t \fInumber\fP, PCRE2_UCHAR **\fIbufferptr\fP,"
 .B "  PCRE2_SIZE *\fIbufflen\fP);"
 .sp
 .B int pcre2_substring_length_byname(pcre2_match_data *\fImatch_data\fP,
 .B "  PCRE2_SPTR \fIname\fP, PCRE2_SIZE *\fIlength\fP);"
 .sp
 .B int pcre2_substring_length_bynumber(pcre2_match_data *\fImatch_data\fP,
-.B "  unsigned int \fInumber\fP, PCRE2_SIZE *\fIlength\fP);"
+.B "  uint32_t \fInumber\fP, PCRE2_SIZE *\fIlength\fP);"
 .sp
 .B int pcre2_substring_nametable_scan(const pcre2_code *\fIcode\fP,
 .B "  PCRE2_SPTR \fIname\fP, PCRE2_SPTR *\fIfirst\fP, PCRE2_SPTR *\fIlast\fP);"
@@ -2248,14 +2248,14 @@
 .sp
 .nf
 .B int pcre2_substring_length_bynumber(pcre2_match_data *\fImatch_data\fP,
-.B "  unsigned int \fInumber\fP, PCRE2_SIZE *\fIlength\fP);"
+.B "  uint32_t \fInumber\fP, PCRE2_SIZE *\fIlength\fP);"
 .sp
 .B int pcre2_substring_copy_bynumber(pcre2_match_data *\fImatch_data\fP,
-.B "  unsigned int \fInumber\fP, PCRE2_UCHAR *\fIbuffer\fP,"
+.B "  uint32_t \fInumber\fP, PCRE2_UCHAR *\fIbuffer\fP,"
 .B "  PCRE2_SIZE *\fIbufflen\fP);"
 .sp
 .B int pcre2_substring_get_bynumber(pcre2_match_data *\fImatch_data\fP,
-.B "  unsigned int \fInumber\fP, PCRE2_UCHAR **\fIbufferptr\fP,"
+.B "  uint32_t \fInumber\fP, PCRE2_UCHAR **\fIbufferptr\fP,"
 .B "  PCRE2_SIZE *\fIbufflen\fP);"
 .sp
 .B void pcre2_substring_free(PCRE2_UCHAR *\fIbuffer\fP);
@@ -2735,6 +2735,6 @@
 .rs
 .sp
 .nf
-Last updated: 27 November 2014
+Last updated: 01 December 2014
 Copyright (c) 1997-2014 University of Cambridge.
 .fi


Modified: code/trunk/src/pcre2.h.in
===================================================================
--- code/trunk/src/pcre2.h.in    2014-11-30 10:05:41 UTC (rev 170)
+++ code/trunk/src/pcre2.h.in    2014-12-01 16:14:53 UTC (rev 171)
@@ -434,16 +434,16 @@
 PCRE2_EXP_DECL int       pcre2_substring_copy_byname(pcre2_match_data *, \
                            PCRE2_SPTR, PCRE2_UCHAR *, PCRE2_SIZE *); \
 PCRE2_EXP_DECL int       pcre2_substring_copy_bynumber(pcre2_match_data *, \
-                           unsigned int, PCRE2_UCHAR *, PCRE2_SIZE *); \
+                           uint32_t, PCRE2_UCHAR *, PCRE2_SIZE *); \
 PCRE2_EXP_DECL void      pcre2_substring_free(PCRE2_UCHAR *); \
 PCRE2_EXP_DECL int       pcre2_substring_get_byname(pcre2_match_data *, \
                            PCRE2_SPTR, PCRE2_UCHAR **, PCRE2_SIZE *); \
 PCRE2_EXP_DECL int       pcre2_substring_get_bynumber(pcre2_match_data *, \
-                           unsigned int, PCRE2_UCHAR **, PCRE2_SIZE *); \
+                           uint32_t, PCRE2_UCHAR **, PCRE2_SIZE *); \
 PCRE2_EXP_DECL int       pcre2_substring_length_byname(pcre2_match_data *, \
                            PCRE2_SPTR, PCRE2_SIZE *); \
 PCRE2_EXP_DECL int       pcre2_substring_length_bynumber(pcre2_match_data *, \
-                           unsigned int, PCRE2_SIZE *); \
+                           uint32_t, PCRE2_SIZE *); \
 PCRE2_EXP_DECL int       pcre2_substring_nametable_scan(const pcre2_code *, \
                            PCRE2_SPTR, PCRE2_SPTR *, PCRE2_SPTR *); \
 PCRE2_EXP_DECL int       pcre2_substring_number_from_name(\


Modified: code/trunk/src/pcre2_context.c
===================================================================
--- code/trunk/src/pcre2_context.c    2014-11-30 10:05:41 UTC (rev 170)
+++ code/trunk/src/pcre2_context.c    2014-12-01 16:14:53 UTC (rev 171)
@@ -82,7 +82,7 @@
 Returns:      pointer to memory or NULL on failure
 */


-PCRE2_EXP_DEFN void *
+extern void *
PRIV(memctl_malloc)(size_t size, pcre2_memctl *memctl)
{
pcre2_memctl *newmemctl;

Modified: code/trunk/src/pcre2_internal.h
===================================================================
--- code/trunk/src/pcre2_internal.h    2014-11-30 10:05:41 UTC (rev 170)
+++ code/trunk/src/pcre2_internal.h    2014-12-01 16:14:53 UTC (rev 171)
@@ -75,38 +75,30 @@
 http://msdn2.microsoft.com/en-us/library/y4h7bcy6(VS.80).aspx. According to the
 information there, using __declspec(dllexport) without "extern" we have a
 definition; with "extern" we have a declaration. The settings here override the
-setting in pcre.h (which is included below); it defines only PCRE2_EXP_DECL,
+setting in pcre2.h (which is included below); it defines only PCRE2_EXP_DECL,
 which is all that is needed for applications (they just import the symbols). We
 use:


-  PCRE2_EXP_DECL       for declarations
-  PCRE2_EXP_DEFN       for definitions of exported functions
-  PCRE2_EXP_DATA_DEFN  for definitions of exported variables
+  PCRE2_EXP_DECL    for declarations
+  PCRE2_EXP_DEFN    for definitions


-The reason for the two DEFN macros is that in non-Windows environments, one
-does not want to have "extern" before variable definitions because it leads to
-compiler warnings. So we distinguish between functions and variables. In
-Windows, the two should always be the same.
-
-The reason for wrapping this in #ifndef PCRE2_EXP_DECL is so that pcretest,
+The reason for wrapping this in #ifndef PCRE2_EXP_DECL is so that pcre2test,
which is an application, but needs to import this file in order to "peek" at
-internals, can #include pcre.h first to get an application's-eye view.
+internals, can #include pcre2.h first to get an application's-eye view.

In principle, people compiling for non-Windows, non-Unix-like (i.e. uncommon,
special-purpose environments) might want to stick other stuff in front of
-exported symbols. That's why, in the non-Windows case, we set PCRE2_EXP_DEFN and
-PCRE2_EXP_DATA_DEFN only if they are not already set. */
+exported symbols. That's why, in the non-Windows case, we set PCRE2_EXP_DEFN
+only if it is not already set. */

 #ifndef PCRE2_EXP_DECL
 #  ifdef _WIN32
 #    ifndef PCRE2_STATIC
 #      define PCRE2_EXP_DECL       extern __declspec(dllexport)
 #      define PCRE2_EXP_DEFN       __declspec(dllexport)
-#      define PCRE2_EXP_DATA_DEFN  __declspec(dllexport)
 #    else
 #      define PCRE2_EXP_DECL       extern
 #      define PCRE2_EXP_DEFN
-#      define PCRE2_EXP_DATA_DEFN
 #    endif
 #  else
 #    ifdef __cplusplus
@@ -117,9 +109,6 @@
 #    ifndef PCRE2_EXP_DEFN
 #      define PCRE2_EXP_DEFN       PCRE2_EXP_DECL
 #    endif
-#    ifndef PCRE2_EXP_DATA_DEFN
-#      define PCRE2_EXP_DATA_DEFN
-#    endif
 #  endif
 #endif


@@ -129,7 +118,7 @@
#include "pcre2.h"
#include "pcre2_ucp.h"

-/* When PCRE is compiled as a C++ library, the subject pointer can be replaced
+/* When PCRE2 is compiled as a C++ library, the subject pointer can be replaced
with a custom type. This makes it possible, for example, to allow pcre2_match()
to process subject strings that are discontinuous by using a smart pointer
class. It must always be possible to inspect all of the subject string in

Modified: code/trunk/src/pcre2_substring.c
===================================================================
--- code/trunk/src/pcre2_substring.c    2014-11-30 10:05:41 UTC (rev 170)
+++ code/trunk/src/pcre2_substring.c    2014-12-01 16:14:53 UTC (rev 171)
@@ -79,7 +79,7 @@
 if (entrysize < 0) return entrysize;
 for (entry = first; entry <= last; entry += entrysize)
   {
-  uint16_t n = GET2(entry, 0);
+  uint32_t n = GET2(entry, 0);
   if (n < match_data->oveccount && match_data->ovector[n*2] != PCRE2_UNSET)
     return pcre2_substring_copy_bynumber(match_data, n, buffer, sizeptr);
   }
@@ -109,7 +109,7 @@


 PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
 pcre2_substring_copy_bynumber(pcre2_match_data *match_data,
-  unsigned int stringnumber, PCRE2_UCHAR *buffer, PCRE2_SIZE *sizeptr)
+  uint32_t stringnumber, PCRE2_UCHAR *buffer, PCRE2_SIZE *sizeptr)
 {
 PCRE2_SIZE left, right;
 PCRE2_SIZE p = 0;
@@ -160,7 +160,7 @@
 if (entrysize < 0) return entrysize;
 for (entry = first; entry <= last; entry += entrysize)
   {
-  uint16_t n = GET2(entry, 0);
+  uint32_t n = GET2(entry, 0);
   if (n < match_data->oveccount && match_data->ovector[n*2] != PCRE2_UNSET)
     return pcre2_substring_get_bynumber(match_data, n, stringptr, sizeptr);
   }
@@ -190,7 +190,7 @@


 PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
 pcre2_substring_get_bynumber(pcre2_match_data *match_data,
-  unsigned int stringnumber, PCRE2_UCHAR **stringptr, PCRE2_SIZE *sizeptr)
+  uint32_t stringnumber, PCRE2_UCHAR **stringptr, PCRE2_SIZE *sizeptr)
 {
 PCRE2_SIZE left, right;
 PCRE2_SIZE p = 0;
@@ -263,7 +263,7 @@
 if (entrysize <= 0) return entrysize;
 for (entry = first; entry <= last; entry += entrysize)
   {
-  uint16_t n = GET2(entry, 0);
+  uint32_t n = GET2(entry, 0);
   if (n < match_data->oveccount && match_data->ovector[n*2] != PCRE2_UNSET)
     return pcre2_substring_length_bynumber(match_data, n, sizeptr);
   }
@@ -288,7 +288,7 @@


 PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
 pcre2_substring_length_bynumber(pcre2_match_data *match_data,
-  unsigned int stringnumber, PCRE2_SIZE *sizeptr)
+  uint32_t stringnumber, PCRE2_SIZE *sizeptr)
 {
 if (stringnumber >= match_data->oveccount ||
     stringnumber > match_data->code->top_bracket ||