From 51a50fdf92bbf7d80ac26e77abc34ba52f430506 Mon Sep 17 00:00:00 2001 From: Daniel Patterson Date: Wed, 17 Jun 2015 17:16:59 -0700 Subject: [PATCH] Realize template functions so that we can actually link. --- src/svg/svg_parser.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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); + + }}