summaryrefslogtreecommitdiffstats
path: root/qtools/qregexp.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-05-31 17:58:24 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2020-05-31 17:58:24 (GMT)
commitb265433382b93625b75cbc1f10b0509489b0b6b7 (patch)
tree896cdcd7e1a9f8c696fa7cf3535be906d2ad31d7 /qtools/qregexp.cpp
parent1705a1442dfa83d6c442bb45ed0d6e76f135ee5a (diff)
downloadDoxygen-b265433382b93625b75cbc1f10b0509489b0b6b7.zip
Doxygen-b265433382b93625b75cbc1f10b0509489b0b6b7.tar.gz
Doxygen-b265433382b93625b75cbc1f10b0509489b0b6b7.tar.bz2
Added experimental multi-thread input processing support.
This is disabled by default. It can be enabled by setting MULTITHREADED_INPUT to 1 in doxygen.h. Still has many data races, so don't use for anything other than development!
Diffstat (limited to 'qtools/qregexp.cpp')
-rw-r--r--qtools/qregexp.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/qtools/qregexp.cpp b/qtools/qregexp.cpp
index d958f0a..8709858 100644
--- a/qtools/qregexp.cpp
+++ b/qtools/qregexp.cpp
@@ -1,5 +1,5 @@
/****************************************************************************
-**
+**
**
** Implementation of QRegExp class
**
@@ -901,8 +901,6 @@ static uint *dump( uint *p )
#endif // DEBUG
-static const int maxlen = 1024; // max length of regexp array
-static uint rxarray[ maxlen ]; // tmp regexp array
/*!
\internal
@@ -913,6 +911,9 @@ static uint rxarray[ maxlen ]; // tmp regexp array
void QRegExp::compile()
{
+ const int maxlen = 1024; // max length of regexp array
+ uint rxarray[ maxlen ]; // tmp regexp array
+
if ( rxdata ) { // delete old data
delete [] rxdata;
rxdata = 0;
@@ -1006,7 +1007,7 @@ void QRegExp::compile()
numFields++;
}
if ( d >= rxarray + maxlen ) { // pattern too long
- error = PatOverflow;
+ error = PatOverflow;
return;
}
if ( !pl ) { // At least ']' should be left