fix python3 portability issue in python binding
This commit is contained in:
parent
c7bb9f23ad
commit
387f3ba0ea
|
@ -1,3 +1,4 @@
|
||||||
|
* fix python3 portability issue in python binding
|
||||||
* delay 5 seconds before reconnecting socks5 proxy for UDP ASSOCIATE
|
* delay 5 seconds before reconnecting socks5 proxy for UDP ASSOCIATE
|
||||||
* fix NAT-PMP crash when removing a mapping at the wrong time
|
* fix NAT-PMP crash when removing a mapping at the wrong time
|
||||||
* improve path sanitization (filter unicode text direction characters)
|
* improve path sanitization (filter unicode text direction characters)
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include <libtorrent/aux_/disable_warnings_push.hpp>
|
#include <libtorrent/aux_/disable_warnings_push.hpp>
|
||||||
#include <boost/python.hpp>
|
#include <boost/python.hpp>
|
||||||
|
#include <boost/python/stl_iterator.hpp>
|
||||||
#include <libtorrent/aux_/disable_warnings_pop.hpp>
|
#include <libtorrent/aux_/disable_warnings_pop.hpp>
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -106,11 +106,10 @@ namespace
|
||||||
|
|
||||||
void make_settings_pack(lt::settings_pack& p, dict const& sett_dict)
|
void make_settings_pack(lt::settings_pack& p, dict const& sett_dict)
|
||||||
{
|
{
|
||||||
list iterkeys = (list)sett_dict.keys();
|
stl_input_iterator<std::string> i(sett_dict.keys()), end;
|
||||||
int const len = boost::python::len(iterkeys);
|
for (; i != end; ++i)
|
||||||
for (int i = 0; i < len; i++)
|
|
||||||
{
|
{
|
||||||
std::string const key = extract<std::string>(iterkeys[i]);
|
std::string const key = *i;
|
||||||
|
|
||||||
int sett = setting_by_name(key);
|
int sett = setting_by_name(key);
|
||||||
if (sett < 0)
|
if (sett < 0)
|
||||||
|
|
Loading…
Reference in New Issue