diff --git a/bindings/python/src/peer_info.cpp b/bindings/python/src/peer_info.cpp index 3894b057c..da983d549 100644 --- a/bindings/python/src/peer_info.cpp +++ b/bindings/python/src/peer_info.cpp @@ -10,17 +10,17 @@ using namespace boost::python; using namespace libtorrent; -int get_last_active(peer_info const& pi) +boost::int64_t get_last_active(peer_info const& pi) { return total_seconds(pi.last_active); } -int get_last_request(peer_info const& pi) +boost::int64_t get_last_request(peer_info const& pi) { return total_seconds(pi.last_request); } -int get_download_queue_time(peer_info const& pi) +boost::int64_t get_download_queue_time(peer_info const& pi) { return total_seconds(pi.download_queue_time); } diff --git a/include/libtorrent/file_storage.hpp b/include/libtorrent/file_storage.hpp index dc6155605..bc0e7f727 100644 --- a/include/libtorrent/file_storage.hpp +++ b/include/libtorrent/file_storage.hpp @@ -138,7 +138,8 @@ namespace libtorrent void set_name(char const* n, bool borrow_string = false, int string_len = 0); std::string filename() const; char const* filename_ptr() const { return name; } - int filename_len() const { return name_len == name_is_owned?strlen(name):name_len; } + int filename_len() const + { return name_len == name_is_owned?int(strlen(name)):int(name_len); } enum { name_is_owned = (1<<12)-1, diff --git a/include/libtorrent/torrent.hpp b/include/libtorrent/torrent.hpp index 31bb82fd6..98bd489f5 100644 --- a/include/libtorrent/torrent.hpp +++ b/include/libtorrent/torrent.hpp @@ -739,7 +739,7 @@ namespace libtorrent int seconds_since_last_scrape() const { return m_last_scrape == (std::numeric_limits::min)() - ? -1 : m_ses.session_time() - m_last_scrape; + ? -1 : int(m_ses.session_time() - m_last_scrape); } #ifndef TORRENT_DISABLE_DHT