forked from premiere/premiere-libtorrent
merged RC_1_1 into master
This commit is contained in:
commit
52e1a7b6c9
|
@ -1,4 +1,5 @@
|
||||||
import python ;
|
import python ;
|
||||||
|
import feature ;
|
||||||
import feature : feature ;
|
import feature : feature ;
|
||||||
import project ;
|
import project ;
|
||||||
import targets ;
|
import targets ;
|
||||||
|
@ -27,11 +28,33 @@ if $(LIBTORRENT_PYTHON_INTERPRETER)
|
||||||
using python : : "$(LIBTORRENT_PYTHON_INTERPRETER)" : : : <libtorrent-python>on ;
|
using python : : "$(LIBTORRENT_PYTHON_INTERPRETER)" : : : <libtorrent-python>on ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# copied from boost 1.63's boost python jamfile
|
||||||
|
rule find-py3-version
|
||||||
|
{
|
||||||
|
local versions = [ feature.values python ] ;
|
||||||
|
local py3ver ;
|
||||||
|
for local v in $(versions)
|
||||||
|
{
|
||||||
|
if $(v) >= 3.0
|
||||||
|
{
|
||||||
|
py3ver = $(v) ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $(py3ver) ;
|
||||||
|
}
|
||||||
|
|
||||||
if $(BOOST_ROOT)
|
if $(BOOST_ROOT)
|
||||||
{
|
{
|
||||||
use-project /boost : $(BOOST_ROOT) ;
|
use-project /boost : $(BOOST_ROOT) ;
|
||||||
alias boost_python : /boost/python//boost_python : : : <include>$(BOOST_ROOT) ;
|
alias boost_python : /boost/python//boost_python : : : <include>$(BOOST_ROOT) ;
|
||||||
alias boost_python3 : /boost/python//boost_python3 : : : <include>$(BOOST_ROOT) ;
|
if [ find-py3-version ]
|
||||||
|
{
|
||||||
|
alias boost_python3 : /boost/python//boost_python3 : : : <include>$(BOOST_ROOT) ;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
alias boost_python3 ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -320,9 +320,8 @@ namespace libtorrent { namespace dht {
|
||||||
void dht_tracker::get_peers(sha1_hash const& ih
|
void dht_tracker::get_peers(sha1_hash const& ih
|
||||||
, std::function<void(std::vector<tcp::endpoint> const&)> f)
|
, std::function<void(std::vector<tcp::endpoint> const&)> f)
|
||||||
{
|
{
|
||||||
std::function<void(std::vector<std::pair<node_entry, std::string>> const&)> empty;
|
|
||||||
for (auto& n : m_nodes)
|
for (auto& n : m_nodes)
|
||||||
n.second.dht.get_peers(ih, f, empty, false);
|
n.second.dht.get_peers(ih, f, {}, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void dht_tracker::announce(sha1_hash const& ih, int listen_port, int flags
|
void dht_tracker::announce(sha1_hash const& ih, int listen_port, int flags
|
||||||
|
|
|
@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <iterator> // std::distance()
|
#include <iterator> // std::distance(), std::next
|
||||||
#include <algorithm> // std::copy, std::remove_copy_if
|
#include <algorithm> // std::copy, std::remove_copy_if
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
|
|
Loading…
Reference in New Issue