forked from premiere/premiere-libtorrent
fix python binding build with no deprecated functions
This commit is contained in:
parent
7f695f05d5
commit
75dc8b7997
|
@ -58,12 +58,13 @@ struct bytes_from_python
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
#ifndef TORRENT_NO_DEPRECATE
|
||||
object client_fingerprint_(peer_id const& id)
|
||||
{
|
||||
boost::optional<fingerprint> result = client_fingerprint(id);
|
||||
return result ? object(*result) : object();
|
||||
}
|
||||
#endif
|
||||
|
||||
entry bdecode_(bytes const& data)
|
||||
{
|
||||
|
@ -85,8 +86,8 @@ void bind_utility()
|
|||
|
||||
#ifndef TORRENT_NO_DEPRECATE
|
||||
def("identify_client", &libtorrent::identify_client);
|
||||
#endif
|
||||
def("client_fingerprint", &client_fingerprint_);
|
||||
#endif
|
||||
def("bdecode", &bdecode_);
|
||||
def("bencode", &bencode_);
|
||||
}
|
||||
|
|
|
@ -39,13 +39,14 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "libtorrent/config.hpp"
|
||||
#include "libtorrent/peer_id.hpp"
|
||||
#include "libtorrent/assert.hpp"
|
||||
#include "libtorrent/export.hpp"
|
||||
|
||||
namespace libtorrent
|
||||
{
|
||||
|
||||
// The fingerprint class represents information about a client and its version. It is used
|
||||
// to encode this information into the client's peer id.
|
||||
struct fingerprint
|
||||
struct TORRENT_DEPRECATED_EXPORT fingerprint
|
||||
{
|
||||
|
||||
// The constructor takes a ``char const*`` that should point to a string constant containing
|
||||
|
|
|
@ -46,6 +46,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
namespace libtorrent
|
||||
{
|
||||
|
||||
// TODO: hide these declarations when deprecaated functions are disabled, and
|
||||
// expose them internally in a header under aux_.
|
||||
|
||||
|
@ -65,6 +66,7 @@ namespace libtorrent
|
|||
TORRENT_DEPRECATED_EXPORT TORRENT_DEPRECATED
|
||||
boost::optional<fingerprint>
|
||||
client_fingerprint(peer_id const& p);
|
||||
|
||||
}
|
||||
|
||||
#endif // TORRENT_IDENTIFY_CLIENT_HPP_INCLUDED
|
||||
|
|
|
@ -44,7 +44,6 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include "libtorrent/config.hpp"
|
||||
#include "libtorrent/version.hpp"
|
||||
#include "libtorrent/fingerprint.hpp"
|
||||
#include "libtorrent/build_config.hpp"
|
||||
#include "libtorrent/settings_pack.hpp"
|
||||
#include "libtorrent/io_service.hpp"
|
||||
|
@ -56,6 +55,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#ifndef TORRENT_NO_DEPRECATE
|
||||
#include "libtorrent/rss.hpp"
|
||||
#include "libtorrent/fingerprint.hpp"
|
||||
#endif
|
||||
|
||||
#ifdef TORRENT_USE_OPENSSL
|
||||
|
|
Loading…
Reference in New Issue