fix dynamic link issue with libtorrent_error_category

This commit is contained in:
Arvid Norberg 2013-06-24 00:14:17 +00:00
parent 1252de8fe3
commit f41ceab27c
2 changed files with 14 additions and 11 deletions

View File

@ -335,12 +335,6 @@ namespace libtorrent
{ return boost::system::error_condition(ev, *this); }
};
inline boost::system::error_category& get_libtorrent_category()
{
static libtorrent_error_category libtorrent_category;
return libtorrent_category;
}
struct TORRENT_EXPORT http_error_category : boost::system::error_category
{
virtual const char* name() const throw();
@ -349,11 +343,8 @@ namespace libtorrent
{ return boost::system::error_condition(ev, *this); }
};
inline boost::system::error_category& get_http_category()
{
static http_error_category http_category;
return http_category;
}
TORRENT_EXPORT boost::system::error_category& get_libtorrent_category();
TORRENT_EXPORT boost::system::error_category& get_http_category();
namespace errors
{

View File

@ -263,6 +263,18 @@ namespace libtorrent
return msgs[ev];
}
boost::system::error_category& get_libtorrent_category()
{
static libtorrent_error_category libtorrent_category;
return libtorrent_category;
}
boost::system::error_category& get_http_category()
{
static http_error_category http_category;
return http_category;
}
const char* http_error_category::name() const throw()
{
return "http error";