From 659a715fc51a485bcc3ad3f148a734c2310dc36d Mon Sep 17 00:00:00 2001 From: artemp Date: Wed, 28 May 2014 15:40:59 +0100 Subject: [PATCH] python : add comparison operators to Map/Layer/Datasource --- bindings/python/mapnik_datasource.cpp | 1 + bindings/python/mapnik_layer.cpp | 3 ++- bindings/python/mapnik_map.cpp | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bindings/python/mapnik_datasource.cpp b/bindings/python/mapnik_datasource.cpp index dd5b7fc35..b90ba2b56 100644 --- a/bindings/python/mapnik_datasource.cpp +++ b/bindings/python/mapnik_datasource.cpp @@ -184,6 +184,7 @@ void export_datasource() .def("params",make_function(params_const,return_value_policy()), "The configuration parameters of the data source. " "These vary depending on the type of data source.") + .def(self == self) ; def("CreateDatasource",&create_datasource); diff --git a/bindings/python/mapnik_layer.cpp b/bindings/python/mapnik_layer.cpp index bd9884535..a1ff63278 100644 --- a/bindings/python/mapnik_layer.cpp +++ b/bindings/python/mapnik_layer.cpp @@ -375,6 +375,7 @@ void export_layer() ">>> lyr.styles[0]\n" "'My Style'\n" ) - + // comparison + .def(self == self) ; } diff --git a/bindings/python/mapnik_map.cpp b/bindings/python/mapnik_map.cpp index c01c1c81d..1a5e92eb6 100644 --- a/bindings/python/mapnik_map.cpp +++ b/bindings/python/mapnik_map.cpp @@ -528,5 +528,7 @@ void export_map() ">>> m.width\n" "800\n" ) + // comparison + .def(self == self) ; }