python bindings: export Query.resolution property as a tuple #1331

Merged
merged 1 commit into from Jul 20, 2012

Projects

None yet

2 participants

@rjw57
Contributor
rjw57 commented Jul 19, 2012

Although the mapnik::query class is exposed to the Python bindings, the resolution attribute is a raw boost::tuple. If you attempt to access this tuple from Python, boost complains strongly.

This patch adds the required magic to marshal the raw boost::tuple which is query::resolution_type into an honest-to-goodness Python tuple.

Question: is this the right approach? The resolution type is a boost::tuple but adding a generic mapping from boost::tuple <-> Python appears non-tivial.

@rjw57 rjw57 python bindings: export Query.resolution property as a tuple
Although the mapnik::query class is exposed to the Python bindings, the
resolution attribute is a raw boost::tuple. If you attempt to access
this tuple from Python, boost complains strongly.

This patch adds the required magic to marshal the raw boost::tuple which
is query::resolution_type into an honest-to-goodness Python tuple.
7b3baee
@artemp
Member
artemp commented Jul 20, 2012

@rjw57 - we should probably add generic boost::tuple to python tuple mapping but this approach works too, thanks!

@artemp artemp merged commit ffbbdff into mapnik:master Jul 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment