forked from premiere/premiere-libtorrent
fix python binding build without deprecated functions
This commit is contained in:
parent
bf8d9ba5bd
commit
4461ae2ba4
|
@ -646,12 +646,14 @@ void bind_session()
|
||||||
arg("settings")
|
arg("settings")
|
||||||
, arg("flags")=lt::session::start_default_features | lt::session::add_default_plugins))
|
, arg("flags")=lt::session::start_default_features | lt::session::add_default_plugins))
|
||||||
)
|
)
|
||||||
|
#ifndef TORRENT_NO_DEPRECATE
|
||||||
.def(
|
.def(
|
||||||
init<fingerprint, int, boost::uint32_t>((
|
init<fingerprint, int, boost::uint32_t>((
|
||||||
arg("fingerprint")=fingerprint("LT",0,1,0,0)
|
arg("fingerprint")=fingerprint("LT",0,1,0,0)
|
||||||
, arg("flags")=lt::session::start_default_features | lt::session::add_default_plugins
|
, arg("flags")=lt::session::start_default_features | lt::session::add_default_plugins
|
||||||
, arg("alert_mask")=int(alert::error_notification)))
|
, arg("alert_mask")=int(alert::error_notification)))
|
||||||
)
|
)
|
||||||
|
#endif
|
||||||
.def("post_torrent_updates", allow_threads(<::session::post_torrent_updates))
|
.def("post_torrent_updates", allow_threads(<::session::post_torrent_updates))
|
||||||
.def("outgoing_ports", &outgoing_ports)
|
.def("outgoing_ports", &outgoing_ports)
|
||||||
.def("is_listening", allow_threads(<::session::is_listening))
|
.def("is_listening", allow_threads(<::session::is_listening))
|
||||||
|
|
|
@ -83,7 +83,9 @@ void bind_utility()
|
||||||
to_python_converter<bytes, bytes_to_python>();
|
to_python_converter<bytes, bytes_to_python>();
|
||||||
bytes_from_python();
|
bytes_from_python();
|
||||||
|
|
||||||
|
#ifndef TORRENT_NO_DEPRECATE
|
||||||
def("identify_client", &libtorrent::identify_client);
|
def("identify_client", &libtorrent::identify_client);
|
||||||
|
#endif
|
||||||
def("client_fingerprint", &client_fingerprint_);
|
def("client_fingerprint", &client_fingerprint_);
|
||||||
def("bdecode", &bdecode_);
|
def("bdecode", &bdecode_);
|
||||||
def("bencode", &bencode_);
|
def("bencode", &bencode_);
|
||||||
|
|
Loading…
Reference in New Issue