Fix peer_plugin.cpp in python bindings to compile.

This commit is contained in:
Andrew Resch 2008-04-15 01:16:09 +00:00
parent 748a66c343
commit 9d397a3834
1 changed files with 3 additions and 2 deletions

View File

@ -5,6 +5,7 @@
#include <libtorrent/extensions.hpp> #include <libtorrent/extensions.hpp>
#include <libtorrent/entry.hpp> #include <libtorrent/entry.hpp>
#include <libtorrent/peer_request.hpp> #include <libtorrent/peer_request.hpp>
#include <libtorrent/disk_buffer_holder.hpp>
#include <boost/python.hpp> #include <boost/python.hpp>
using namespace boost::python; using namespace boost::python;
@ -144,7 +145,7 @@ namespace
return this->peer_plugin::on_request(req); return this->peer_plugin::on_request(req);
} }
bool on_piece(peer_request const& piece, char const* data) bool on_piece(peer_request const& piece, disk_buffer_holder& data)
{ {
if (override f = this->get_override("on_piece")) if (override f = this->get_override("on_piece"))
return f(piece, data); return f(piece, data);
@ -152,7 +153,7 @@ namespace
return peer_plugin::on_piece(piece, data); return peer_plugin::on_piece(piece, data);
} }
bool default_on_piece(peer_request const& piece, char const* data) bool default_on_piece(peer_request const& piece, disk_buffer_holder& data)
{ {
return this->peer_plugin::on_piece(piece, data); return this->peer_plugin::on_piece(piece, data);
} }