one more python type converter

This commit is contained in:
Arvid Norberg 2010-12-15 08:30:04 +00:00
parent 8ce1b38cbc
commit 8846fe4b93
2 changed files with 7 additions and 0 deletions

View File

@ -225,6 +225,7 @@ def main():
ses.listen_on(options.port, options.port + 10)
ses.set_settings(settings)
# ses.set_severity_level(lt.alert.severity_levels.info)
ses.set_alert_mask(0xfffffff)
ses.add_extension(lt.create_ut_pex_plugin)
ses.add_extension(lt.create_ut_metadata_plugin)
ses.add_extension(lt.create_metadata_plugin)

View File

@ -21,11 +21,17 @@ struct endpoint_to_python
{
return incref(make_tuple(ep.address().to_string(), ep.port()).ptr());
}
static PyObject* convert(udp::endpoint const& ep)
{
return incref(make_tuple(ep.address().to_string(), ep.port()).ptr());
}
};
void bind_alert()
{
to_python_converter<tcp::endpoint, endpoint_to_python>();
to_python_converter<udp::endpoint, endpoint_to_python>();
using boost::noncopyable;