From f985d0a09ea08ab0c1ef14357f54c5f44bd1cab8 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Wed, 16 Sep 2026 20:04:21 +0200 Subject: [PATCH 1/7] [core] deprecate Match.h implementation detail header --- README/ReleaseNotes/v642/index.md | 1 + core/base/inc/Match.h | 3 +++ core/base/inc/TRegexp.h | 2 +- core/base/src/Match.cxx | 2 +- core/base/src/TRegexp.cxx | 2 ++ core/rint/src/TTabCom.cxx | 3 +++ 6 files changed, 11 insertions(+), 2 deletions(-) diff --git a/README/ReleaseNotes/v642/index.md b/README/ReleaseNotes/v642/index.md index 61c80c9c5b822..47a980645f032 100644 --- a/README/ReleaseNotes/v642/index.md +++ b/README/ReleaseNotes/v642/index.md @@ -74,6 +74,7 @@ The `TMVA_SOFIE_GNN` tutorials have been migrated to this workflow and produce i * Including `RConfig.h` and `RVersion.h` is now deprecated and will be removed after ROOT 6.44, use instead `ROOT/RConfig.hxx` and `ROOT/RVersion.hxx`. * The header `Rpair.h` is deprecated and will be removed after ROOT 6.44, use `` instead. * The headers `Htypes.h` and `Gtypes.h` that were deprecated in ROOT 6.20 will now emit warnings and will be fully removed in ROOT 6.44. Use instead `Rtypes.h`. +* The header `Match.h` is deprecated and will be removed in ROOT 6.44, use instead public interface of `TRegExp.h` * The header `GLConstants.h` is no longer part of ROOT installed headers. * The header `PosixThreadInc.h` is deprecated and will be removed after ROOT 6.44. Use instead `` and ``. * The header `RStringView.h` deprecated in ROOT 6.14 will now emit warnings and will be fully removed after ROOT 6.44. Use `ROOT/RStringView.hxx` instead. diff --git a/core/base/inc/Match.h b/core/base/inc/Match.h index f9b08dc31f4b5..c535e8e8f57ea 100644 --- a/core/base/inc/Match.h +++ b/core/base/inc/Match.h @@ -20,6 +20,9 @@ ////////////////////////////////////////////////////////////////////////// #include +#if !defined(ROOT_Match_cxx) && !defined(G__DICTIONARY) +#warning "This header is deprecated and will be removed in ROOT 6.44, use instead public interface of `TRegExp.h`" +#endif typedef unsigned short Pattern_t; diff --git a/core/base/inc/TRegexp.h b/core/base/inc/TRegexp.h index 4604e26f60413..fd24cc3fd4b81 100644 --- a/core/base/inc/TRegexp.h +++ b/core/base/inc/TRegexp.h @@ -23,7 +23,7 @@ #include "Rtypes.h" -#include "Match.h" +typedef unsigned short Pattern_t; class TString; diff --git a/core/base/src/Match.cxx b/core/base/src/Match.cxx index da5226cb608a5..7e26718ffb702 100644 --- a/core/base/src/Match.cxx +++ b/core/base/src/Match.cxx @@ -22,7 +22,7 @@ #include #include - +#define ROOT_Match_cxx #include "Match.h" diff --git a/core/base/src/TRegexp.cxx b/core/base/src/TRegexp.cxx index 27a32c4988da5..f79903614e324 100644 --- a/core/base/src/TRegexp.cxx +++ b/core/base/src/TRegexp.cxx @@ -35,6 +35,8 @@ Warning: The preferred way to use regular expressions is via std::regex. E.g., Index() functions may return incorrect result. */ +#define ROOT_Match_cxx +#include "Match.h" #include "TRegexp.h" #include "TString.h" #include "TError.h" diff --git a/core/rint/src/TTabCom.cxx b/core/rint/src/TTabCom.cxx index bb3efc749b7a7..7cccbacf89a79 100644 --- a/core/rint/src/TTabCom.cxx +++ b/core/rint/src/TTabCom.cxx @@ -122,6 +122,9 @@ //////////////////////////////////////////////////////////////////////////// #include "RConfigure.h" +#define ROOT_Match_cxx +#include "Match.h" +#include "TRegExp.h" #include "TTabCom.h" #include "TClass.h" #include "TClassTable.h" From 4c7ee3172115aebf6474715a58073b206d371666 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Wed, 16 Sep 2026 20:20:48 +0200 Subject: [PATCH 2/7] [core] fix header typo case --- core/rint/src/TTabCom.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/rint/src/TTabCom.cxx b/core/rint/src/TTabCom.cxx index 7cccbacf89a79..31bb80f06fd4a 100644 --- a/core/rint/src/TTabCom.cxx +++ b/core/rint/src/TTabCom.cxx @@ -124,7 +124,7 @@ #include "RConfigure.h" #define ROOT_Match_cxx #include "Match.h" -#include "TRegExp.h" +#include "TRegexp.h" #include "TTabCom.h" #include "TClass.h" #include "TClassTable.h" From 89d31a475ec5fd9cb50ce3905e55c8864a695ee6 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Wed, 16 Sep 2026 20:26:54 +0200 Subject: [PATCH 3/7] [core] avoid duplicated and/or colliding Pattern_t typedefs --- core/base/inc/TRegexp.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/base/inc/TRegexp.h b/core/base/inc/TRegexp.h index fd24cc3fd4b81..d576f70ebd862 100644 --- a/core/base/inc/TRegexp.h +++ b/core/base/inc/TRegexp.h @@ -23,8 +23,6 @@ #include "Rtypes.h" -typedef unsigned short Pattern_t; - class TString; @@ -34,7 +32,7 @@ class TRegexp { enum EStatVal { kOK = 0, kIllegal, kNomem, kToolong }; private: - Pattern_t *fPattern; // Compiled pattern + unsigned short *fPattern; // Compiled pattern EStatVal fStat; // Status static const unsigned fgMaxpat; // Max length of compiled pattern From 6ea226a8648a9ba8b7c01e87d7fb44f2b0ab1722 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Wed, 16 Sep 2026 20:32:49 +0200 Subject: [PATCH 4/7] [core] ensure fPattern stays in sync with Pattern_t --- core/base/src/TRegexp.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/base/src/TRegexp.cxx b/core/base/src/TRegexp.cxx index f79903614e324..496916d5fd253 100644 --- a/core/base/src/TRegexp.cxx +++ b/core/base/src/TRegexp.cxx @@ -44,7 +44,7 @@ E.g., Index() functions may return incorrect result. const unsigned TRegexp::fgMaxpat = 2048; - +#include //////////////////////////////////////////////////////////////////////////////// /// Create a regular expression from the input string. If wildcard is @@ -54,6 +54,7 @@ const unsigned TRegexp::fgMaxpat = 2048; TRegexp::TRegexp(const char *re, Bool_t wildcard) { + static_assert(std::is_same_v, "Type mismatch in fPattern!"); if (wildcard) GenPattern(MakeWildcard(re)); else From e296998b94e3fa9d8d79b8838268cf11c267b1bd Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Wed, 16 Sep 2026 20:48:44 +0200 Subject: [PATCH 5/7] Update TRegexp.cxx --- core/base/src/TRegexp.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/base/src/TRegexp.cxx b/core/base/src/TRegexp.cxx index 496916d5fd253..5e11cf814b25b 100644 --- a/core/base/src/TRegexp.cxx +++ b/core/base/src/TRegexp.cxx @@ -54,7 +54,7 @@ const unsigned TRegexp::fgMaxpat = 2048; TRegexp::TRegexp(const char *re, Bool_t wildcard) { - static_assert(std::is_same_v, "Type mismatch in fPattern!"); + static_assert(std::is_same_v, "Type mismatch in fPattern!"); if (wildcard) GenPattern(MakeWildcard(re)); else From eb7abc5025c3228f15c39fd70ff1b36d5d28820c Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Wed, 16 Sep 2026 20:58:58 +0200 Subject: [PATCH 6/7] [core] missed remove ref --- core/base/src/TRegexp.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/base/src/TRegexp.cxx b/core/base/src/TRegexp.cxx index 5e11cf814b25b..1d905bff38ad8 100644 --- a/core/base/src/TRegexp.cxx +++ b/core/base/src/TRegexp.cxx @@ -54,7 +54,7 @@ const unsigned TRegexp::fgMaxpat = 2048; TRegexp::TRegexp(const char *re, Bool_t wildcard) { - static_assert(std::is_same_v, "Type mismatch in fPattern!"); + static_assert(std::is_same_v, Pattern_t>, "Type mismatch in fPattern!"); if (wildcard) GenPattern(MakeWildcard(re)); else From 828ce3e26572cb2aa495b1193f47cd6a0ee3f812 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Wed, 16 Sep 2026 21:13:24 +0200 Subject: [PATCH 7/7] Update TTabCom.h --- core/rint/inc/TTabCom.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/rint/inc/TTabCom.h b/core/rint/inc/TTabCom.h index b1aa1eba3d2a2..368bda7f4f69b 100644 --- a/core/rint/inc/TTabCom.h +++ b/core/rint/inc/TTabCom.h @@ -218,7 +218,7 @@ class TTabCom { char* fBuf; // initialized by Hook() int* fpLoc; // initialized by Hook() - Pattern_t fPat[ kNUM_PAT ][ MAX_LEN_PAT ]; // array of patterns + unsigned short fPat[ kNUM_PAT ][ MAX_LEN_PAT ]; // array of patterns const char* fRegExp[ kNUM_PAT ]; // corresponding regular expression plain text Bool_t fVarIsPointer; // frodo: pointer or not flag Int_t fLastIter; // frodo: iteration counter for recursive MakeClassFromVarName