From fe3ffe6c2dc827df32fc323e27da10000109016c Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Sun, 6 Dec 2009 22:33:47 +0000 Subject: [PATCH] rename map.save_map_string to map.save_map_to_string --- bindings/python/mapnik/__init__.py | 2 +- bindings/python/mapnik_python.cpp | 6 +++--- include/mapnik/save_map.hpp | 2 +- src/save_map.cpp | 2 +- tests/python_tests/save_map_test.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bindings/python/mapnik/__init__.py b/bindings/python/mapnik/__init__.py index 52df83974..50aa277f8 100644 --- a/bindings/python/mapnik/__init__.py +++ b/bindings/python/mapnik/__init__.py @@ -564,7 +564,7 @@ __all__ = [ # factory methods 'Filter', # load/save/render - 'load_map', 'load_map_from_string', 'save_map', 'save_map_string', + 'load_map', 'load_map_from_string', 'save_map', 'save_map_to_string', 'render', 'render_tile_to_file', 'render_to_file', # other 'register_plugins', 'register_fonts', diff --git a/bindings/python/mapnik_python.cpp b/bindings/python/mapnik_python.cpp index fb4204ec9..3d0e7d158 100644 --- a/bindings/python/mapnik_python.cpp +++ b/bindings/python/mapnik_python.cpp @@ -265,7 +265,7 @@ bool has_pycairo() BOOST_PYTHON_FUNCTION_OVERLOADS(load_map_overloads, load_map, 2, 3); BOOST_PYTHON_FUNCTION_OVERLOADS(load_map_string_overloads, load_map_string, 2, 4); BOOST_PYTHON_FUNCTION_OVERLOADS(save_map_overloads, save_map, 2, 3); -BOOST_PYTHON_FUNCTION_OVERLOADS(save_map_string_overloads, save_map_string, 1, 2); +BOOST_PYTHON_FUNCTION_OVERLOADS(save_map_to_string_overloads, save_map_to_string, 1, 2); BOOST_PYTHON_MODULE(_mapnik) { @@ -275,7 +275,7 @@ BOOST_PYTHON_MODULE(_mapnik) using mapnik::load_map; using mapnik::load_map_string; using mapnik::save_map; - using mapnik::save_map_string; + using mapnik::save_map_to_string; register_exception_translator(translator); register_cairo(); @@ -467,7 +467,7 @@ BOOST_PYTHON_MODULE(_mapnik) ); */ - def("save_map_string", & save_map_string, save_map_string_overloads()); + def("save_map_to_string", & save_map_to_string, save_map_to_string_overloads()); def("mapnik_version", &mapnik_version,"Get the Mapnik version number"); def("mapnik_svn_revision", &mapnik_svn_revision,"Get the Mapnik svn revision"); def("has_cairo", &has_cairo, "Get cairo library status"); diff --git a/include/mapnik/save_map.hpp b/include/mapnik/save_map.hpp index 2d42d0217..92fff46db 100644 --- a/include/mapnik/save_map.hpp +++ b/include/mapnik/save_map.hpp @@ -32,7 +32,7 @@ namespace mapnik { MAPNIK_DECL void save_map(Map const& map, std::string const& filename, bool explicit_defaults = false); - MAPNIK_DECL std::string save_map_string(Map const& map, bool explicit_defaults = false); + MAPNIK_DECL std::string save_map_to_string(Map const& map, bool explicit_defaults = false); } diff --git a/src/save_map.cpp b/src/save_map.cpp index 487849c65..3031858ef 100644 --- a/src/save_map.cpp +++ b/src/save_map.cpp @@ -574,7 +574,7 @@ namespace mapnik write_xml(filename,pt); } - std::string save_map_string(Map const & map, bool explicit_defaults) + std::string save_map_to_string(Map const & map, bool explicit_defaults) { ptree pt; serialize_map(pt,map,explicit_defaults); diff --git a/tests/python_tests/save_map_test.py b/tests/python_tests/save_map_test.py index 03f608ff5..4470127f8 100644 --- a/tests/python_tests/save_map_test.py +++ b/tests/python_tests/save_map_test.py @@ -27,7 +27,7 @@ def test(): mapnik.load_map(new_map, test_map) - eq_(open(test_map).read(),mapnik.save_map_string(new_map)) + eq_(open(test_map).read(),mapnik.save_map_to_string(new_map)) if os.path.exists(test_map): os.remove(test_map)