merged python binding fix from RC_0_16

This commit is contained in:
Arvid Norberg 2013-01-04 17:52:35 +00:00
parent cd4b38cfc3
commit c29b019291
2 changed files with 20 additions and 0 deletions

View File

@ -8,6 +8,7 @@
* fix uTP edge case where udp socket buffer fills up
* fix nagle implementation in uTP
* added missing pop_alerts() to python bindings
* fixed typos in configure script, inversing some feature-enable/disable flags
* added missing flag_update_subscribe to python bindings
* active_dht_limit, active_tracker_limit and active_lsd_limit now interpret -1 as infinite

View File

@ -418,6 +418,24 @@ namespace
return e;
}
list pop_alerts(session& ses)
{
std::deque<alert*> alerts;
{
allow_threading_guard guard;
ses.pop_alerts(&alerts);
}
list ret;
for (std::deque<alert*>::iterator i = alerts.begin()
, end(alerts.end()); i != end; ++i)
{
std::auto_ptr<alert> ptr(*i);
ret.append(ptr);
}
return ret;
}
} // namespace unnamed
@ -628,6 +646,7 @@ void bind_session()
#endif
.def("set_alert_mask", allow_threads(&session::set_alert_mask))
.def("pop_alert", allow_threads(&session::pop_alert))
.def("pop_alerts", &pop_alerts)
.def("wait_for_alert", &wait_for_alert, return_internal_reference<>())
.def("add_extension", &add_extension)
#ifndef TORRENT_NO_DEPRECATE