fixed add_node in python binding

This commit is contained in:
Arvid Norberg 2010-05-22 08:21:40 +00:00
parent 39a166844e
commit df36088cab
2 changed files with 8 additions and 1 deletions

View File

@ -27,6 +27,11 @@ namespace
{
set_piece_hashes(c, p, boost::bind(call_python_object, cb, _1));
}
void add_node(create_torrent& ct, std::string const& addr, int port)
{
ct.add_node(std::make_pair(addr, port));
}
}
void bind_create_torrent()
@ -78,7 +83,7 @@ void bind_create_torrent()
.def("set_creator", &create_torrent::set_creator)
.def("set_hash", &set_hash)
.def("add_url_seed", &create_torrent::add_url_seed)
.def("add_node", &create_torrent::add_node)
.def("add_node", &add_node)
.def("add_tracker", &create_torrent::add_tracker)
.def("set_priv", &create_torrent::set_priv)
.def("num_pieces", &create_torrent::num_pieces)

View File

@ -95,6 +95,8 @@ a list of entries.
* torrent_handle::get_download_queue
* torrent_handle::piece_availability
``create_torrent::add_node()`` takes two arguments, one string and one integer,
instead of a pair. The string is the address and the integer is the port.
.. _`main library reference`: manual.html