From 9319b5bb83bf76a7618d44677771224c65322e2b Mon Sep 17 00:00:00 2001
From: "Philip.Hazel"
Date: Sun, 28 Jul 2019 15:58:24 +0000
Subject: [PATCH] Correct tables argument data type for
pcre2_set_character_tables() and fix documentation for pcre2_maketables().
---
ChangeLog | 3 +++
doc/html/pcre2_maketables.html | 2 +-
doc/html/pcre2_set_character_tables.html | 2 +-
doc/html/pcre2api.html | 6 +++---
doc/pcre2.txt | 6 +++---
doc/pcre2_maketables.3 | 2 +-
doc/pcre2_set_character_tables.3 | 2 +-
doc/pcre2api.3 | 8 ++++----
src/pcre2.h.in | 2 +-
src/pcre2_context.c | 2 +-
10 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index dea4a87..bf22250 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -114,6 +114,9 @@ within it, the nested lookbehind was not correctly processed. For example, if
22. A branch that started with (*ACCEPT) was not being recognized as one that
could match an empty string.
+23. Corrected pcre2_set_character_tables() tables data type: was const unsigned
+char * instead of const uint8_t *, as generated by pcre2_maketables().
+
Version 10.33 16-April-2019
---------------------------
diff --git a/doc/html/pcre2_maketables.html b/doc/html/pcre2_maketables.html
index 6d240e3..1963654 100644
--- a/doc/html/pcre2_maketables.html
+++ b/doc/html/pcre2_maketables.html
@@ -19,7 +19,7 @@ SYNOPSIS
#include <pcre2.h>
-const unsigned char *pcre2_maketables(pcre2_general_context *gcontext);
+const uint8_t *pcre2_maketables(pcre2_general_context *gcontext);
DESCRIPTION
diff --git a/doc/html/pcre2_set_character_tables.html b/doc/html/pcre2_set_character_tables.html
index 5a1bd20..43c02ff 100644
--- a/doc/html/pcre2_set_character_tables.html
+++ b/doc/html/pcre2_set_character_tables.html
@@ -20,7 +20,7 @@ SYNOPSIS
int pcre2_set_character_tables(pcre2_compile_context *ccontext,
- const unsigned char *tables);
+ const uint8_t *tables);
DESCRIPTION
diff --git a/doc/html/pcre2api.html b/doc/html/pcre2api.html
index 64eb4ed..16ec15d 100644
--- a/doc/html/pcre2api.html
+++ b/doc/html/pcre2api.html
@@ -142,7 +142,7 @@ document for an overview of all the PCRE2 documentation.
int pcre2_set_character_tables(pcre2_compile_context *ccontext,
- const unsigned char *tables);
+ const uint8_t *tables);
int pcre2_set_compile_extra_options(pcre2_compile_context *ccontext,
@@ -791,7 +791,7 @@ interpreted matching functions, pcre2_match() and
int pcre2_set_character_tables(pcre2_compile_context *ccontext,
- const unsigned char *tables);
+ const uint8_t *tables);
The value must be the result of a call to pcre2_maketables(), whose only
@@ -3851,7 +3851,7 @@ Cambridge, England.
REVISION
-Last updated: 22 July 2019
+Last updated: 28 July 2019
Copyright © 1997-2019 University of Cambridge.
diff --git a/doc/pcre2.txt b/doc/pcre2.txt
index f662610..142a9b3 100644
--- a/doc/pcre2.txt
+++ b/doc/pcre2.txt
@@ -261,7 +261,7 @@ PCRE2 NATIVE API COMPILE CONTEXT FUNCTIONS
uint32_t value);
int pcre2_set_character_tables(pcre2_compile_context *ccontext,
- const unsigned char *tables);
+ const uint8_t *tables);
int pcre2_set_compile_extra_options(pcre2_compile_context *ccontext,
uint32_t extra_options);
@@ -831,7 +831,7 @@ PCRE2 CONTEXTS
pcre2_dfa_match().
int pcre2_set_character_tables(pcre2_compile_context *ccontext,
- const unsigned char *tables);
+ const uint8_t *tables);
The value must be the result of a call to pcre2_maketables(), whose
only argument is a general context. This function builds a set of char-
@@ -3706,7 +3706,7 @@ AUTHOR
REVISION
- Last updated: 22 July 2019
+ Last updated: 28 July 2019
Copyright (c) 1997-2019 University of Cambridge.
------------------------------------------------------------------------------
diff --git a/doc/pcre2_maketables.3 b/doc/pcre2_maketables.3
index 740954b..7dc8438 100644
--- a/doc/pcre2_maketables.3
+++ b/doc/pcre2_maketables.3
@@ -7,7 +7,7 @@ PCRE2 - Perl-compatible regular expressions (revised API)
.B #include
.PP
.SM
-.B const unsigned char *pcre2_maketables(pcre2_general_context *\fIgcontext\fP);
+.B const uint8_t *pcre2_maketables(pcre2_general_context *\fIgcontext\fP);
.
.SH DESCRIPTION
.rs
diff --git a/doc/pcre2_set_character_tables.3 b/doc/pcre2_set_character_tables.3
index 1ede4f9..1b740a1 100644
--- a/doc/pcre2_set_character_tables.3
+++ b/doc/pcre2_set_character_tables.3
@@ -8,7 +8,7 @@ PCRE2 - Perl-compatible regular expressions (revised API)
.PP
.nf
.B int pcre2_set_character_tables(pcre2_compile_context *\fIccontext\fP,
-.B " const unsigned char *\fItables\fP);"
+.B " const uint8_t *\fItables\fP);"
.fi
.
.SH DESCRIPTION
diff --git a/doc/pcre2api.3 b/doc/pcre2api.3
index 2781251..0be2a70 100644
--- a/doc/pcre2api.3
+++ b/doc/pcre2api.3
@@ -1,4 +1,4 @@
-.TH PCRE2API 3 "22 July 2019" "PCRE2 10.34"
+.TH PCRE2API 3 "28 July 2019" "PCRE2 10.34"
.SH NAME
PCRE2 - Perl-compatible regular expressions (revised API)
.sp
@@ -88,7 +88,7 @@ document for an overview of all the PCRE2 documentation.
.B " uint32_t \fIvalue\fP);"
.sp
.B int pcre2_set_character_tables(pcre2_compile_context *\fIccontext\fP,
-.B " const unsigned char *\fItables\fP);"
+.B " const uint8_t *\fItables\fP);"
.sp
.B int pcre2_set_compile_extra_options(pcre2_compile_context *\fIccontext\fP,
.B " uint32_t \fIextra_options\fP);"
@@ -725,7 +725,7 @@ interpreted matching functions, \fIpcre2_match()\fP and
.sp
.nf
.B int pcre2_set_character_tables(pcre2_compile_context *\fIccontext\fP,
-.B " const unsigned char *\fItables\fP);"
+.B " const uint8_t *\fItables\fP);"
.fi
.sp
The value must be the result of a call to \fIpcre2_maketables()\fP, whose only
@@ -3863,6 +3863,6 @@ Cambridge, England.
.rs
.sp
.nf
-Last updated: 22 July 2019
+Last updated: 28 July 2019
Copyright (c) 1997-2019 University of Cambridge.
.fi
diff --git a/src/pcre2.h.in b/src/pcre2.h.in
index 1c48ae5..1208d32 100644
--- a/src/pcre2.h.in
+++ b/src/pcre2.h.in
@@ -584,7 +584,7 @@ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
pcre2_set_bsr(pcre2_compile_context *, uint32_t); \
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
- pcre2_set_character_tables(pcre2_compile_context *, const unsigned char *); \
+ pcre2_set_character_tables(pcre2_compile_context *, const uint8_t *); \
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
pcre2_set_compile_extra_options(pcre2_compile_context *, uint32_t); \
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
diff --git a/src/pcre2_context.c b/src/pcre2_context.c
index 9c2886a..f904a49 100644
--- a/src/pcre2_context.c
+++ b/src/pcre2_context.c
@@ -323,7 +323,7 @@ data. */
PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
pcre2_set_character_tables(pcre2_compile_context *ccontext,
- const unsigned char *tables)
+ const uint8_t *tables)
{
ccontext->tables = tables;
return 0;