Skip to content

Commit

Permalink
Fixed segfault with RoutingModel
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Sep 17, 2024
1 parent fc3d85c commit 0d55326
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/or-tools/routing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ void init_routing(Rice::Module& m) {
return Rice::detail::From_Ruby<int64_t>().convert(callback.call("call", from_index));
}
);
})
}, Rice::Arg("callback").keepAlive())
.define_method("register_transit_matrix", &RoutingModel::RegisterTransitMatrix)
.define_method(
"register_transit_callback",
Expand All @@ -319,7 +319,7 @@ void init_routing(Rice::Module& m) {
return Rice::detail::From_Ruby<int64_t>().convert(callback.call("call", from_index, to_index));
}
);
})
}, Rice::Arg("callback").keepAlive())
.define_method("add_dimension", &RoutingModel::AddDimension)
.define_method("add_dimension_with_vehicle_transits", &RoutingModel::AddDimensionWithVehicleTransits)
.define_method("add_dimension_with_vehicle_capacity", &RoutingModel::AddDimensionWithVehicleCapacity)
Expand Down

0 comments on commit 0d55326

Please sign in to comment.