From 4461ae2ba43b5d3bd7133c433ffd588015c58611 Mon Sep 17 00:00:00 2001 From: arvidn Date: Mon, 8 Jun 2015 17:56:18 -0400 Subject: [PATCH] fix python binding build without deprecated functions --- bindings/python/src/session.cpp | 2 ++ bindings/python/src/utility.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/bindings/python/src/session.cpp b/bindings/python/src/session.cpp index f2e794b5a..3accc2e27 100644 --- a/bindings/python/src/session.cpp +++ b/bindings/python/src/session.cpp @@ -646,12 +646,14 @@ void bind_session() arg("settings") , arg("flags")=lt::session::start_default_features | lt::session::add_default_plugins)) ) +#ifndef TORRENT_NO_DEPRECATE .def( init(( arg("fingerprint")=fingerprint("LT",0,1,0,0) , arg("flags")=lt::session::start_default_features | lt::session::add_default_plugins , arg("alert_mask")=int(alert::error_notification))) ) +#endif .def("post_torrent_updates", allow_threads(<::session::post_torrent_updates)) .def("outgoing_ports", &outgoing_ports) .def("is_listening", allow_threads(<::session::is_listening)) diff --git a/bindings/python/src/utility.cpp b/bindings/python/src/utility.cpp index 9e5b34663..a8740be5b 100644 --- a/bindings/python/src/utility.cpp +++ b/bindings/python/src/utility.cpp @@ -83,7 +83,9 @@ void bind_utility() to_python_converter(); bytes_from_python(); +#ifndef TORRENT_NO_DEPRECATE def("identify_client", &libtorrent::identify_client); +#endif def("client_fingerprint", &client_fingerprint_); def("bdecode", &bdecode_); def("bencode", &bencode_);