From 94ab42612ad96a27bd1ea4890e570adc1f1649ad Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Tue, 6 Feb 2024 17:28:48 +0100 Subject: [PATCH] work around some Swig 4.2 change Several test cases started failing after updating to Swig 4.2 because the spot.ltsmin module and the spot.impl module were using different names for atomic_prop_set. This seems to work around it. * python/spot/impl.i: Specify the full type for atomic_prop_set. --- python/spot/impl.i | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/python/spot/impl.i b/python/spot/impl.i index 680e90149..778983aac 100644 --- a/python/spot/impl.i +++ b/python/spot/impl.i @@ -529,7 +529,13 @@ namespace std { %template(vectorstring) vector; %template(vectorint) vector; %template(pair_formula_vectorstring) pair>; - %template(atomic_prop_set) set; + // We specify the optional std::less/std::allocator arguments of set + // to work around an issue that appeared with Swig 4.2. Without those + // arguments the type of set used in module ltlsmin.i + // does not match the type of set used here! + %template(atomic_prop_set) set, + std::allocator>; %template(vectorofvectorofformulas) vector>; %template(setunsigned) set; %template(relabeling_map) map; @@ -813,7 +819,9 @@ def state_is_accepting(self, src) -> "bool": %include %include -%extend std::set { +%extend std::set, + std::allocator> { std::string __str__() { std::ostringstream os;