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.
This commit is contained in:
parent
f6af2a84cb
commit
aaff42ee22
3 changed files with 8 additions and 8 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue