build windows python bindings with geoip support. fixes some warnings in msvc
This commit is contained in:
@@ -30,7 +30,7 @@ def arch():
|
||||
if platform.system() == 'Windows':
|
||||
# on windows, build using bjam and build an installer
|
||||
import shutil
|
||||
if os.system('bjam boost=source link=static boost-link=static release msvc-7.1 optimization=space') != 0:
|
||||
if os.system('bjam boost=source link=static geoip=static boost-link=static release msvc-7.1 optimization=space') != 0:
|
||||
print 'build failed'
|
||||
sys.exit(1)
|
||||
try: os.mkdir(r'build')
|
||||
@@ -39,7 +39,7 @@ if platform.system() == 'Windows':
|
||||
except: pass
|
||||
try: os.mkdir(r'libtorrent')
|
||||
except: pass
|
||||
shutil.copyfile(r'bin\msvc-7.1\release\boost-source\link-static\optimization-space\threading-multi\libtorrent.pyd', r'.\build\lib\libtorrent.pyd')
|
||||
shutil.copyfile(r'bin\msvc-7.1\release\boost-source\geoip-static\link-static\optimization-space\threading-multi\libtorrent.pyd', r'.\build\lib\libtorrent.pyd')
|
||||
setup( name='python-libtorrent',
|
||||
version='@PACKAGE_VERSION@',
|
||||
author = 'Arvid Norberg',
|
||||
|
@@ -70,7 +70,7 @@ namespace libtorrent
|
||||
{
|
||||
TORRENT_ASSERT(index >= 0);
|
||||
TORRENT_ASSERT(index < m_size);
|
||||
return m_bytes[index / 8] & (0x80 >> (index & 7));
|
||||
return (m_bytes[index / 8] & (0x80 >> (index & 7))) != 0;
|
||||
}
|
||||
|
||||
void clear_bit(int index)
|
||||
@@ -135,7 +135,7 @@ namespace libtorrent
|
||||
typedef bool& reference;
|
||||
typedef std::forward_iterator_tag iterator_category;
|
||||
|
||||
bool operator*() { return *byte & bit; }
|
||||
bool operator*() { return (*byte & bit) != 0; }
|
||||
const_iterator& operator++() { inc(); return *this; }
|
||||
const_iterator operator++(int)
|
||||
{ const_iterator ret(*this); inc(); return ret; }
|
||||
|
@@ -52,6 +52,8 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#elif defined(BOOST_MSVC)
|
||||
|
||||
#pragma warning(disable: 4258)
|
||||
|
||||
# if defined(TORRENT_BUILDING_SHARED)
|
||||
# define TORRENT_EXPORT __declspec(dllexport)
|
||||
# elif defined(TORRENT_LINKING_SHARED)
|
||||
|
@@ -58,7 +58,7 @@ namespace libtorrent
|
||||
|
||||
class torrent;
|
||||
class peer_connection;
|
||||
class bitfield;
|
||||
struct bitfield;
|
||||
|
||||
struct TORRENT_EXPORT piece_block
|
||||
{
|
||||
|
Reference in New Issue
Block a user