updated to the new pikotools api: SpaceParser::SetSpace(...) methods have been removed

This commit is contained in:
2021-05-21 01:37:42 +02:00
parent 8bb585d97d
commit 27720afaf2
11 changed files with 13 additions and 39 deletions

View File

@@ -1136,7 +1136,6 @@ void App::ReadPostJson()
const int buffer_len = sizeof(buffer) / sizeof(char) - 1;
int read_len;
space_parser.SetSpace(cur.request->post_in);
post_buffer.clear();
post_buffer.reserve(1024 * 1024 * 5); // IMPROVEME add to config?
@@ -1155,7 +1154,7 @@ void App::ReadPostJson()
if( !post_buffer.empty() )
{
pt::SpaceParser::Status status = space_parser.ParseJSON(post_buffer.c_str());
pt::SpaceParser::Status status = space_parser.ParseJSON(post_buffer.c_str(), cur.request->post_in);
post_buffer.clear();
if( status != pt::SpaceParser::ok )

View File

@@ -66,10 +66,6 @@ void Config::ShowError()
switch( parser.status )
{
case pt::SpaceParser::no_space:
log << log2 << "Config: space not set" << logend;
break;
case pt::SpaceParser::ok:
log << log2 << "Config: syntax ok" << logend;
break;
@@ -106,9 +102,7 @@ bool Config::ReadConfig(bool errors_to_stdout_, bool stdout_is_closed)
}
log << log2 << "Config: reading a config file" << logend;
parser.SetSpace(space);
pt::SpaceParser::Status status = parser.ParseSpaceFile(config_file);
pt::SpaceParser::Status status = parser.ParseSpaceFile(config_file, space);
if( status == pt::SpaceParser::ok )
{

View File

@@ -144,8 +144,7 @@ pt::Space space;
pt::SpaceParser parser;
pt::Date date;
parser.SetSpace(space);
pt::SpaceParser::Status status = parser.ParseSpaceFile(file);
pt::SpaceParser::Status status = parser.ParseSpaceFile(file, space);
if( status == pt::SpaceParser::ok )
{

View File

@@ -167,11 +167,8 @@ void TimeZones::ParseZones()
// just space by space (not implemented in Space at the moment)
bool TimeZones::ReadTimeZones(const wchar_t * path)
{
parser.SetSpace(temp_space);
zone_tab.clear();
temp_space.clear();
pt::SpaceParser::Status status = parser.ParseSpaceFile(path);
pt::SpaceParser::Status status = parser.ParseSpaceFile(path, temp_space);
if( status == pt::SpaceParser::ok )
{