python binding fix (still doesn't work with msvc9)

This commit is contained in:
Arvid Norberg 2011-06-08 08:37:01 +00:00
parent 2bfa8005d4
commit b0432627b1
2 changed files with 3 additions and 3 deletions

View File

@ -146,7 +146,7 @@ namespace
{
// torrent_info objects are always held by an intrusive_ptr in the python binding
if (params.has_key("ti"))
p.ti = extract<torrent_info const*>(params["ti"]);
p.ti = extract<intrusive_ptr<torrent_info> >(params["ti"]);
std::string url;
if (params.has_key("tracker_url"))

View File

@ -135,10 +135,10 @@ void bind_torrent_info()
class_<torrent_info, boost::intrusive_ptr<torrent_info> >("torrent_info", no_init)
#ifndef TORRENT_NO_DEPRECATE
.def(init<entry const&, int>((arg("e"), arg("flags") = 0)))
.def(init<entry const&>(arg("e")))
#endif
.def(init<sha1_hash const&, int>((arg("info_hash"), arg("flags") = 0)))
.def(init<char const*, int>((arg("file"), arg("flags") = 0)))
.def(init<char const*, int, int>((arg("buffer"), arg("length"), arg("flags") = 0)))
.def(init<std::string, int>((arg("file"), arg("flags") = 0)))
.def(init<torrent_info const&, int>((arg("ti"), arg("flags") = 0)))
#if TORRENT_USE_WSTRING