Merge pull request #387 from arvidn/python-msvc-fix

attempt to fix python bindings on windows
This commit is contained in:
Arvid Norberg 2016-01-14 08:29:49 -05:00
commit 13c3369463
2 changed files with 3 additions and 1 deletions

View File

@ -198,6 +198,9 @@ void bind_alert()
using boost::noncopyable; using boost::noncopyable;
#ifndef TORRENT_NO_DEPRECATE #ifndef TORRENT_NO_DEPRECATE
typedef boost::shared_ptr<alert> alert_holder; typedef boost::shared_ptr<alert> alert_holder;
#ifndef _MSC_VER
register_ptr_to_python<boost::shared_ptr<alert> >();
#endif
#else #else
typedef alert alert_holder; typedef alert alert_holder;
#endif #endif

View File

@ -583,7 +583,6 @@ namespace
void bind_session() void bind_session()
{ {
register_ptr_to_python<boost::shared_ptr<alert> >();
#ifndef TORRENT_DISABLE_DHT #ifndef TORRENT_DISABLE_DHT
void (lt::session::*dht_get_immutable_item)(sha1_hash const&) = &lt::session::dht_get_item; void (lt::session::*dht_get_immutable_item)(sha1_hash const&) = &lt::session::dht_get_item;
sha1_hash (lt::session::*dht_put_immutable_item)(entry data) = &lt::session::dht_put_item; sha1_hash (lt::session::*dht_put_immutable_item)(entry data) = &lt::session::dht_put_item;