Register to_python converter for shared_ptr<entry>

This commit is contained in:
Andrew Resch 2008-09-14 18:34:08 +00:00
parent c087c363be
commit ba60d4818b
1 changed files with 8 additions and 0 deletions

View File

@ -49,6 +49,13 @@ struct entry_to_python
}
}
static PyObject* convert(boost::shared_ptr<entry> const& e)
{
if (!e)
return incref(Py_None);
return convert(*e);
}
static PyObject* convert(entry const& e)
{
return incref(convert0(e).ptr());
@ -126,6 +133,7 @@ struct entry_from_python
void bind_entry()
{
to_python_converter<boost::shared_ptr<libtorrent::entry>, entry_to_python>();
to_python_converter<entry, entry_to_python>();
entry_from_python();
}