forked from premiere/premiere-libtorrent
merged utf8 conversion fix from RC_0_16
This commit is contained in:
parent
00c1017f16
commit
c065b1fa80
|
@ -6,6 +6,7 @@
|
|||
#define BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY 1
|
||||
#endif
|
||||
|
||||
#include "libtorrent/config.hpp"
|
||||
#include <boost/python/module.hpp>
|
||||
|
||||
void bind_utility();
|
||||
|
@ -41,7 +42,9 @@ BOOST_PYTHON_MODULE(libtorrent)
|
|||
bind_entry();
|
||||
bind_session();
|
||||
bind_torrent_info();
|
||||
#if TORRENT_USE_WSTRING
|
||||
bind_unicode_string_conversion();
|
||||
#endif
|
||||
bind_torrent_handle();
|
||||
bind_torrent_status();
|
||||
bind_session_settings();
|
||||
|
|
|
@ -3,10 +3,14 @@
|
|||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/python.hpp>
|
||||
#include "libtorrent/config.hpp"
|
||||
#include "libtorrent/utf8.hpp"
|
||||
#include <string>
|
||||
|
||||
#if TORRENT_USE_WSTRING
|
||||
|
||||
using namespace boost::python;
|
||||
using namespace libtorrent;
|
||||
|
||||
struct unicode_from_python
|
||||
{
|
||||
|
@ -69,3 +73,5 @@ void bind_unicode_string_conversion()
|
|||
unicode_from_python();
|
||||
}
|
||||
|
||||
#endif // TORRENT_USE_WSTRING
|
||||
|
||||
|
|
|
@ -377,11 +377,11 @@ inline int snprintf(char* buf, int len, char const* fmt, ...)
|
|||
#endif
|
||||
|
||||
#ifndef TORRENT_USE_WSTRING
|
||||
#if defined UNICODE && !defined BOOST_NO_STD_WSTRING
|
||||
#if !defined BOOST_NO_STD_WSTRING
|
||||
#define TORRENT_USE_WSTRING 1
|
||||
#else
|
||||
#define TORRENT_USE_WSTRING 0
|
||||
#endif // UNICODE
|
||||
#endif // BOOST_NO_STD_WSTRING
|
||||
#endif // TORRENT_USE_WSTRING
|
||||
|
||||
#ifndef TORRENT_HAS_FALLOCATE
|
||||
|
|
Loading…
Reference in New Issue