From a3d397e1946a73411b36815e5365d050d1e78533 Mon Sep 17 00:00:00 2001 From: arvidn Date: Sat, 6 Jun 2015 17:38:46 -0400 Subject: [PATCH] fix python binding build issue --- bindings/python/Jamfile | 5 ++--- bindings/python/src/create_torrent.cpp | 16 ++++++++-------- include/libtorrent/session_settings.hpp | 2 +- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/bindings/python/Jamfile b/bindings/python/Jamfile index 66a27b156..58ffa001f 100755 --- a/bindings/python/Jamfile +++ b/bindings/python/Jamfile @@ -12,7 +12,7 @@ lib boost_python : : boost_python ; feature visibility : default hidden : composite propagated link-incompatible ; feature.compose hidden : -fvisibility=hidden -fvisibility-inlines-hidden ; -feature libtorrent-link : static shared : ; +feature libtorrent-link : shared static : ; feature libtorrent-python-pic : off on : composite propagated link-incompatible ; feature.compose on : -fPIC ; @@ -46,7 +46,6 @@ rule libtorrent_linking ( properties * ) if source in $(properties) { - if static in $(properties) && linux in $(properties) { ECHO "WARNING: you cannot link statically against boost-python on linux, because it links against pthread statically in that case, which is not allowed" ; @@ -137,7 +136,7 @@ my-python-extension libtorrent @libtorrent_linking : # default build static - static + shared false ; diff --git a/bindings/python/src/create_torrent.cpp b/bindings/python/src/create_torrent.cpp index 01917c5cc..9dd6697e6 100644 --- a/bindings/python/src/create_torrent.cpp +++ b/bindings/python/src/create_torrent.cpp @@ -107,7 +107,7 @@ namespace char const* filestorage_name(file_storage const& fs) { return fs.name().c_str(); } - bool call_python_object2(boost::python::object const& obj, std::string& i) + bool call_python_object2(boost::python::object& obj, std::string const& i) { return obj(i); } @@ -123,11 +123,11 @@ namespace void bind_create_torrent() { void (file_storage::*add_file0)(std::string const&, boost::int64_t - , int, std::time_t, std::string const&) = &file_storage::add_file; + , int, std::time_t, std::string const&) = &file_storage::add_file; #if !defined TORRENT_NO_DEPRECATE #if TORRENT_USE_WSTRING void (file_storage::*add_file1)(std::wstring const&, boost::int64_t - , int, std::time_t, std::string const&) = &file_storage::add_file; + , int, std::time_t, std::string const&) = &file_storage::add_file; #endif // TORRENT_USE_WSTRING #endif // TORRENT_NO_DEPRECATE @@ -143,12 +143,12 @@ void bind_create_torrent() #endif void (*add_files0)(file_storage&, std::string const&, boost::uint32_t) = add_files; - std::string const& (file_storage::*file_storage_symlink)(int) const = &file_storage::symlink; + std::string const& (file_storage::*file_storage_symlink)(int) const = &file_storage::symlink; sha1_hash (file_storage::*file_storage_hash)(int) const = &file_storage::hash; - std::string (file_storage::*file_storage_file_path)(int, std::string const&) const = &file_storage::file_path; - boost::int64_t (file_storage::*file_storage_file_size)(int) const = &file_storage::file_size; - boost::int64_t (file_storage::*file_storage_file_offset)(int) const = &file_storage::file_offset; - int (file_storage::*file_storage_file_flags)(int) const = &file_storage::file_flags; + std::string (file_storage::*file_storage_file_path)(int, std::string const&) const = &file_storage::file_path; + boost::int64_t (file_storage::*file_storage_file_size)(int) const = &file_storage::file_size; + boost::int64_t (file_storage::*file_storage_file_offset)(int) const = &file_storage::file_offset; + int (file_storage::*file_storage_file_flags)(int) const = &file_storage::file_flags; #if !defined TORRENT_NO_DEPRECATE file_entry (file_storage::*at)(int) const = &file_storage::at; diff --git a/include/libtorrent/session_settings.hpp b/include/libtorrent/session_settings.hpp index 0e18966f0..cf359a073 100644 --- a/include/libtorrent/session_settings.hpp +++ b/include/libtorrent/session_settings.hpp @@ -173,7 +173,7 @@ namespace libtorrent // sent the request until it considers the tracker to have timed-out. // Default value is 60 seconds. int tracker_completion_timeout; - + // the number of seconds to wait to receive any data from the tracker. If // no data is received for this number of seconds, the tracker will be // considered as having timed out. If a tracker is down, this is the kind