diff --git a/src/svg/svg_parser.cpp b/src/svg/svg_parser.cpp index e2e6a84e9..1acedf287 100644 --- a/src/svg/svg_parser.cpp +++ b/src/svg/svg_parser.cpp @@ -57,7 +57,6 @@ namespace mapnik { namespace svg { -bool parse_reader(svg_parser & parser,xmlTextReaderPtr reader); void process_node(svg_parser & parser,xmlTextReaderPtr reader); void start_element(svg_parser & parser,xmlTextReaderPtr reader); void end_element(svg_parser & parser,xmlTextReaderPtr reader); @@ -1093,13 +1092,13 @@ void svg_parser::parse_from_string(std::string const& svg) } template -int xmlInputReadCallback(boost::iostreams::stream * stream, char * buffer, int len) { +int _xmlInputReadCallback(boost::iostreams::stream * stream, char * buffer, int len) { stream->read(buffer,len); return stream->gcount(); } template -int xmlInputCloseCallback(boost::iostreams::stream * stream) +int _xmlInputCloseCallback(boost::iostreams::stream * stream) { if(stream->close()) { @@ -1111,9 +1110,9 @@ int xmlInputCloseCallback(boost::iostreams::stream * stream) template void svg_parser::parse_from_stream(boost::iostreams::stream const& svg_stream) { - xmlTextReaderPtr reader = xmlReaderForIO(xmlInputReadCallback, - xmlInputCloseCallback - &svg_stream, + xmlTextReaderPtr reader = xmlReaderForIO(_xmlInputReadCallback, + _xmlInputCloseCallback, + reinterpret_cast(&svg_stream), nullptr, nullptr, (XML_PARSE_NOBLANKS | XML_PARSE_NOCDATA | XML_PARSE_NOERROR | XML_PARSE_NOWARNING)); @@ -1127,5 +1126,9 @@ void svg_parser::parse_from_stream(boost::iostreams::stream const& svg_stream } } +template void svg_parser::parse_from_stream(boost::iostreams::stream const& svg_stream); +template void svg_parser::parse_from_stream(boost::iostreams::stream const& svg_stream); + + }}