python: return torrent handles in alerts by value

This is needed to avoid a dangling reference if the client stores a
reference to the handle.
This commit is contained in:
Steven Siloti 2017-09-09 16:46:21 -07:00 committed by Arvid Norberg
parent c848f6d978
commit 1cd40ee7e3
1 changed files with 1 additions and 1 deletions

View File

@ -234,7 +234,7 @@ void bind_alert()
class_<torrent_alert, bases<alert>, noncopyable>(
"torrent_alert", no_init)
.def_readonly("handle", &torrent_alert::handle)
.add_property("handle", make_getter(&torrent_alert::handle, by_value()))
;
class_<tracker_alert, bases<torrent_alert>, noncopyable>(