mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-16 19:54:38 +01:00
Add reinterpret_cast for the arguments of the pcre_fullinfo function.
Signed-off-by: FrancisANDRE <zosrothko@orange.fr>
This commit is contained in:
parent
dd65c10b53
commit
fbf7c4dc46
@ -49,14 +49,14 @@ RegularExpression::RegularExpression(const std::string& pattern, int options, bo
|
|||||||
if (study)
|
if (study)
|
||||||
_extra = pcre_study(reinterpret_cast<pcre*>(_pcre), 0, &error);
|
_extra = pcre_study(reinterpret_cast<pcre*>(_pcre), 0, &error);
|
||||||
|
|
||||||
pcre_fullinfo(_pcre, _extra, PCRE_INFO_NAMECOUNT, &nmcount);
|
pcre_fullinfo(reinterpret_cast<const pcre*>(_pcre), reinterpret_cast<const pcre_extra*>(_extra), PCRE_INFO_NAMECOUNT, &nmcount);
|
||||||
pcre_fullinfo(_pcre, _extra, PCRE_INFO_NAMEENTRYSIZE, &nmentrysz);
|
pcre_fullinfo(reinterpret_cast<const pcre*>(_pcre), reinterpret_cast<const pcre_extra*>(_extra), PCRE_INFO_NAMEENTRYSIZE, &nmentrysz);
|
||||||
pcre_fullinfo(_pcre, _extra, PCRE_INFO_NAMETABLE, &nmtbl);
|
pcre_fullinfo(reinterpret_cast<const pcre*>(_pcre), reinterpret_cast<const pcre_extra*>(_extra), PCRE_INFO_NAMETABLE, &nmtbl);
|
||||||
|
|
||||||
for (int i = 0; i < nmcount; i++)
|
for (int i = 0; i < nmcount; i++)
|
||||||
{
|
{
|
||||||
unsigned char* group = nmtbl + 2 + (nmentrysz * i);
|
unsigned char* group = nmtbl + 2 + (nmentrysz * i);
|
||||||
int n = pcre_get_stringnumber(_pcre, (char*) group);
|
int n = pcre_get_stringnumber(reinterpret_cast<const pcre*>(_pcre), (char*) group);
|
||||||
_groups[n] = std::string((char*) group);
|
_groups[n] = std::string((char*) group);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user