fixed python bindings build with disabled DHT support

This commit is contained in:
Arvid Norberg 2011-04-28 09:24:42 +00:00
parent 2ab17b7a51
commit a4651536c9
3 changed files with 5 additions and 0 deletions

View File

@ -86,6 +86,7 @@
incoming connection
* added more detailed instrumentation of the disk I/O thread
* fixed python bindings build with disabled DHT support
* fixed BSD file allocation issue
* fixed bug in session::delete_files option to remove_torrent

View File

@ -411,6 +411,7 @@ void bind_session()
#endif
;
#ifndef TORRENT_DISABLE_DHT
class_<dht_lookup>("dht_lookup")
.def_readonly("type", &dht_lookup::type)
.def_readonly("outstanding_requests", &dht_lookup::outstanding_requests)
@ -418,6 +419,7 @@ void bind_session()
.def_readonly("response", &dht_lookup::responses)
.def_readonly("branch_factor", &dht_lookup::branch_factor)
;
#endif
enum_<storage_mode_t>("storage_mode_t")
.value("storage_mode_allocate", storage_mode_allocate)

View File

@ -338,7 +338,9 @@ void bind_torrent_handle()
.def("need_save_resume_data", _(&torrent_handle::need_save_resume_data))
.def("force_reannounce", _(force_reannounce0))
.def("force_reannounce", &force_reannounce)
#ifndef TORRENT_DISABLE_DHT
.def("force_dht_announce", _(&torrent_handle::force_dht_announce))
#endif
.def("scrape_tracker", _(&torrent_handle::scrape_tracker))
.def("name", _(&torrent_handle::name))
.def("set_upload_mode", _(&torrent_handle::set_upload_mode))