diff --git a/bindings/python/mapnik_text_placement.cpp b/bindings/python/mapnik_text_placement.cpp index 05201326a..c2b08eb50 100644 --- a/bindings/python/mapnik_text_placement.cpp +++ b/bindings/python/mapnik_text_placement.cpp @@ -194,13 +194,16 @@ struct ListNodeWrap: formatting::list_node, wrapper ListNodeWrap(object l) : formatting::list_node(), wrapper() { stl_input_iterator begin(l), end; - children_.insert(children_.end(), begin, end); + while (begin != end) + { + children_.push_back(*begin); + ++begin; + } } /* TODO: Add constructor taking variable number of arguments. http://wiki.python.org/moin/boost.python/HowTo#A.22Raw.22_function */ - virtual void apply(char_properties const& p, feature_impl const& feature, processed_text &output) const { if(override o = this->get_override("apply")) diff --git a/tests/visual_tests/test_python.py b/tests/visual_tests/test_python.py index a452f3a87..301017bc1 100755 --- a/tests/visual_tests/test_python.py +++ b/tests/visual_tests/test_python.py @@ -104,6 +104,6 @@ for format_tree in format_trees: expected = os.path.join(dirname,"images", 'python-%s-reference.png' % format_tree[0]) mapnik.render_to_file(m, actual, 'png8:m=h') diff = compare(actual,expected) - if diff > 1: + if diff > 0: print 'comparision failed between:\n %s (actual)\n %s (expected)' % (actual,expected)