Skip to content

Commit efacd97

Browse files
committed
PYBIND11_MAKE_OPAQUE(rules)
1 parent 1dfceab commit efacd97

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/mapnik_style.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,17 @@
2929
//pybind11
3030
#include <pybind11/pybind11.h>
3131
#include <pybind11/stl.h>
32+
#include <pybind11/stl_bind.h>
33+
3234

3335
namespace py = pybind11;
3436

3537
using mapnik::feature_type_style;
3638
using mapnik::rules;
3739
using mapnik::rule;
3840

41+
PYBIND11_MAKE_OPAQUE(rules);
42+
3943
std::string get_image_filters(feature_type_style & style)
4044
{
4145
std::string filters_str;
@@ -57,16 +61,12 @@ void set_image_filters(feature_type_style & style, std::string const& filters)
5761

5862
void export_style(py::module const& m)
5963
{
60-
6164
py::enum_<mapnik::filter_mode_enum>(m, "filter_mode")
6265
.value("ALL",mapnik::filter_mode_enum::FILTER_ALL)
6366
.value("FIRST",mapnik::filter_mode_enum::FILTER_FIRST)
6467
;
6568

66-
//py::class_<rules>(m, "Rules")
67-
// .def(py::init<>(), "default ctor")
68-
// .def(vector_indexing_suite<rules>())
69-
// ;
69+
py::bind_vector<rules>(m, "Rules", py::module_local());
7070

7171
py::class_<feature_type_style>(m, "Style")
7272
.def(py::init<>(), "default style constructor")

0 commit comments

Comments
 (0)