mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-27 02:53:10 +01:00
fixed GH #1581: Cannot find 'pcre.h' when using POCO_UNBUNDLED, a non-system PCRE, and CMake
Conflicts: Foundation/include/Poco/RegularExpression.h Foundation/src/RegularExpression.cpp
This commit is contained in:
@@ -28,20 +28,6 @@
|
||||
#include <map>
|
||||
|
||||
|
||||
#ifdef POCO_UNBUNDLED
|
||||
#include <pcre.h>
|
||||
#else
|
||||
//
|
||||
// Copy these definitions from pcre.h
|
||||
// to avoid pulling in the entire header file
|
||||
//
|
||||
extern "C"
|
||||
{
|
||||
typedef struct real_pcre8_or_16 pcre;
|
||||
struct pcre_extra;
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace Poco {
|
||||
|
||||
|
||||
@@ -214,8 +200,10 @@ protected:
|
||||
std::string::size_type substOne(std::string& subject, std::string::size_type offset, const std::string& replacement, int options) const;
|
||||
|
||||
private:
|
||||
pcre* _pcre;
|
||||
pcre_extra* _extra;
|
||||
// Note: to avoid a dependency on the pcre.h header the following are
|
||||
// declared as void* and casted to the correct type in the implementation file.
|
||||
void* _pcre; // Actual type is pcre*
|
||||
void* _extra; // Actual type is struct pcre_extra*
|
||||
|
||||
GroupMap _groups;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user