Commit aaff42ee authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz

python: fix output of twa_run

* src/twaalgos/emptiness.hh, src/twaalgos/emptiness.cc: Declare the
operator<< for twa_run, not for twa_run_ptr (the shared_ptr
automatically forward operator<<).
* wrap/python/spot_impl.i: Add __str__ to twa_run, not twa_run_ptr.
parent f6af2a84
......@@ -254,9 +254,9 @@ namespace spot
}
std::ostream&
operator<<(std::ostream& os, const twa_run_ptr& run)
operator<<(std::ostream& os, const twa_run& run)
{
auto& a = run->aut;
auto& a = run.aut;
bdd_dict_ptr d = a->get_dict();
auto pstep = [&](const twa_run::step& st)
......@@ -268,11 +268,11 @@ namespace spot
os << '\n';
};
os << "Prefix:" << std::endl;
for (auto& s: run->prefix)
os << "Prefix:\n";
for (auto& s: run.prefix)
pstep(s);
os << "Cycle:" << std::endl;
for (auto& s: run->cycle)
os << "Cycle:\n";
for (auto& s: run.cycle)
pstep(s);
return os;
}
......
......@@ -332,7 +332,7 @@ namespace spot
/// actually exists in the automaton (and will also display any
/// transition annotation).
SPOT_API
friend std::ostream& operator<<(std::ostream& os, const twa_run_ptr& run);
friend std::ostream& operator<<(std::ostream& os, const twa_run& run);
};
/// @}
......
......@@ -383,7 +383,7 @@ namespace std {
}
}
%extend spot::twa_run_ptr {
%extend spot::twa_run {
std::string __str__()
{
std::ostringstream os;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment