merged fixes from RC_0_16

This commit is contained in:
Arvid Norberg 2013-09-07 21:27:07 +00:00
parent 288f203a92
commit 7c66c2911f
4 changed files with 20 additions and 3 deletions

View File

@ -23,6 +23,7 @@
* fix uTP edge case where udp socket buffer fills up
* fix nagle implementation in uTP
* fix boost-1.42 support for python bindings
* fix memory allocation issue (virtual addres space waste) on windows
0.16.11 release

View File

@ -311,11 +311,25 @@ void connect_peer(torrent_handle& th, tuple ip, int source)
}
#ifndef TORRENT_NO_DEPRECATE
#if BOOST_VERSION > 104200
boost::intrusive_ptr<const torrent_info> get_torrent_info(torrent_handle const& h)
{
return boost::intrusive_ptr<const torrent_info>(&h.get_torrent_info());
return boost::intrusive_ptr<const torrent_info>(&h.get_torrent_info());
}
#else
boost::intrusive_ptr<torrent_info> get_torrent_info(torrent_handle const& h)
{
// I can't figure out how to expose intrusive_ptr<const torrent_info>
// as well as supporting mutable instances. So, this hack is better
// than compilation errors. It seems to work on newer versions of boost though
return boost::intrusive_ptr<torrent_info>(const_cast<torrent_info*>(&h.get_torrent_info()));
}
#endif
void set_peer_upload_limit(torrent_handle& th, tuple const& ip, int limit)
{
th.set_peer_upload_limit(tuple_to_endpoint(ip), limit);

View File

@ -285,7 +285,9 @@ void bind_torrent_info()
.value("source_tex", announce_entry::source_tex)
;
#if BOOST_VERSION > 104200
implicitly_convertible<boost::intrusive_ptr<torrent_info>, boost::intrusive_ptr<const torrent_info> >();
boost::python::register_ptr_to_python<boost::intrusive_ptr<const torrent_info> >();
#endif
}

View File

@ -11,6 +11,6 @@ package=@PACKAGE@
Name: libtorrent-rasterbar
Description: Bittorrent library.
Version: @VERSION@
Libs: -L${libdir} -ltorrent-rasterbar
Libs.private: @LIBS@ @BOOST_SYSTEM_LIB@ @PTHREAD_LIBS@ @OPENSSL_LIBS@
Libs: -L${libdir} -ltorrent-rasterbar @BOOST_SYSTEM_LIB@
Libs.private: @LIBS@ @PTHREAD_LIBS@ @OPENSSL_LIBS@
Cflags: -I${includedir} -I${includedir}/libtorrent @COMPILETIME_OPTIONS@