From f65df0630546bdc2cb88e2639d81f0286eced39d Mon Sep 17 00:00:00 2001 From: Philip Hazel Date: Sun, 24 Apr 2022 16:44:33 +0100 Subject: [PATCH] Remove unused enum; add comments re unity builds --- ChangeLog | 6 ++++-- src/pcre2_compile.c | 2 ++ src/pcre2_convert.c | 5 ++--- src/pcre2_dfa_match.c | 2 ++ src/pcre2_match.c | 2 ++ 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index d0c1781..6d403ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,5 @@ -Change Log for PCRE2 --------------------- +Change Log for PCRE2 - see also the Git log +------------------------------------------- Version 10.41 xx-xxx-2022 @@ -16,6 +16,8 @@ pcre2test. It never would have overflowed in practice, but some casts have been added and at the some time there's been some tidying of fprints that output size_t values. +4. PR #94 showed up an unused enum in pcre2_convert.c, which is now removed. + Version 10.40 15-April-2022 --------------------------- diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c index 48d7b97..d9eb7e5 100644 --- a/src/pcre2_compile.c +++ b/src/pcre2_compile.c @@ -10620,6 +10620,8 @@ re = NULL; goto EXIT; } +/* These #undefs are here to enable unity builds with CMake. */ + #undef NLBLOCK /* Block containing newline information */ #undef PSSTART /* Field containing processed string start */ #undef PSEND /* Field containing processed string end */ diff --git a/src/pcre2_convert.c b/src/pcre2_convert.c index f127389..36466e4 100644 --- a/src/pcre2_convert.c +++ b/src/pcre2_convert.c @@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel Original API code Copyright (c) 1997-2012 University of Cambridge - New API code Copyright (c) 2016-2018 University of Cambridge + New API code Copyright (c) 2016-2022 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -65,9 +65,8 @@ POSSIBILITY OF SUCH DAMAGE. #define STR_QUERY_s STR_LEFT_PARENTHESIS STR_QUESTION_MARK STR_s STR_RIGHT_PARENTHESIS #define STR_STAR_NUL STR_LEFT_PARENTHESIS STR_ASTERISK STR_N STR_U STR_L STR_RIGHT_PARENTHESIS -/* States for range and POSIX processing */ +/* States for POSIX processing */ -enum { RANGE_NOT_STARTED, RANGE_STARTING, RANGE_ACTIVE }; enum { POSIX_START_REGEX, POSIX_ANCHORED, POSIX_NOT_BRACKET, POSIX_CLASS_NOT_STARTED, POSIX_CLASS_STARTING, POSIX_CLASS_STARTED }; diff --git a/src/pcre2_dfa_match.c b/src/pcre2_dfa_match.c index 9563e1f..b16e594 100644 --- a/src/pcre2_dfa_match.c +++ b/src/pcre2_dfa_match.c @@ -4057,6 +4057,8 @@ while (rws->next != NULL) return rc; } +/* These #undefs are here to enable unity builds with CMake. */ + #undef NLBLOCK /* Block containing newline information */ #undef PSSTART /* Field containing processed string start */ #undef PSEND /* Field containing processed string end */ diff --git a/src/pcre2_match.c b/src/pcre2_match.c index 814e274..efab7d0 100644 --- a/src/pcre2_match.c +++ b/src/pcre2_match.c @@ -7533,6 +7533,8 @@ else match_data->rc = PCRE2_ERROR_NOMATCH; return match_data->rc; } +/* These #undefs are here to enable unity builds with CMake. */ + #undef NLBLOCK /* Block containing newline information */ #undef PSSTART /* Field containing processed string start */ #undef PSEND /* Field containing processed string end */