Skip to content

Commit 02cb32b

Browse files
committed
fix output type of index.map_types() function
1 parent 3310574 commit 02cb32b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/index.cc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,14 @@ LocationTable *create_map(const std::string& config_string) {
1212
return map_factory.create_map(config_string).release();
1313
}
1414

15-
std::vector<std::string> map_types() {
15+
PyObject *map_types() {
1616
const auto& map_factory = osmium::index::MapFactory<osmium::unsigned_object_id_type, osmium::Location>::instance();
17-
return map_factory.map_types();
17+
18+
boost::python::list* l = new boost::python::list();
19+
for(auto const &e : map_factory.map_types())
20+
(*l).append(e);
21+
22+
return l->ptr();
1823
}
1924

2025
BOOST_PYTHON_MODULE(index)

0 commit comments

Comments
 (0)