diff --git a/bindings/python/src/alert.cpp b/bindings/python/src/alert.cpp index 7f4541775..9dc16fc9e 100644 --- a/bindings/python/src/alert.cpp +++ b/bindings/python/src/alert.cpp @@ -170,9 +170,11 @@ void bind_alert() using boost::noncopyable; #ifndef TORRENT_NO_DEPRECATE typedef boost::shared_ptr alert_holder; -#if BOOST_VERSION >= 106000 - register_ptr_to_python >(); -#endif + + if (boost::python::converter::registry::query( + boost::python::type_id >()) == NULL) { + register_ptr_to_python >(); + } #else typedef alert alert_holder; #endif @@ -663,7 +665,7 @@ void bind_alert() ; class_, noncopyable>( "torrent_need_cert_alert", no_init) - .def_readonly("error", &torrent_need_cert_alert::error) + .def_readonly("error", &torrent_need_cert_alert::error) ; class_, noncopyable>(