~ubuntu-branches/ubuntu/maverick/libtorrent-rasterbar/maverick

« back to all changes in this revision

Viewing changes to include/libtorrent/bencode.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Cristian Greco
  • Date: 2009-05-13 12:08:59 UTC
  • mfrom: (3.2.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090513120859-b5qqlwi43aai3pq3
Tags: 0.14.3-1
* New Upstream Version
  - new package libtorrent-rasterbar3 (bump up library soname).
* debian/control:
  - add Vcs-* stuff (switch to git-buildpackage) and bump up
    Standards-Version to 3.8.1 (no changes required);
  - build-depends on debhelper (>= 7.0.50) and use override_dh_command;
  - move -dbg package to the new 'debug' section;
  - build-depends on autotools-dev and overwrite config.{sub,guess} with a
    recent version in debian/rules.
  - build-depends on quilt and python-docutils:
    + debian/patches/fix_html_docs.patch: fix html documentation for offline
      browsing and add another missing doc file;
    + rebuild docs at build time in debian/rules;
* debian/example.makefile: install a simple makefile for example programs
  included in -doc package.
* debian/rules, debian/python-libtorrent.install: don't rely on hardcoded
  python version, use --install-layout=deb when building python bindings,
  and install to '*-packages' instead of 'site-packages' (this should
  prepare for python2.6 and minimize Ubuntu diff).

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
#pragma warning(push, 1)
70
70
#endif
71
71
 
72
 
#include <boost/lexical_cast.hpp>
73
72
#include <boost/static_assert.hpp>
74
73
 
75
74
#ifdef _MSC_VER
246
245
                                TORRENT_ASSERT(*in == 'e');
247
246
                                ++in; // 'e' 
248
247
                                ret = entry(entry::int_t);
249
 
                                ret.integer() = boost::lexical_cast<entry::integer_type>(val);
 
248
                                char* end_pointer;
 
249
#ifdef TORRENT_WINDOWS
 
250
                                ret.integer() = _strtoi64(val.c_str(), &end_pointer, 10);
 
251
#else
 
252
                                ret.integer() = strtoll(val.c_str(), &end_pointer, 10);
 
253
#endif
250
254
#ifdef TORRENT_DEBUG
251
255
                                ret.m_type_queried = false;
252
256
#endif
 
257
                                if (end_pointer == val.c_str())
 
258
                                {
 
259
                                        err = true;
 
260
                                        return;
 
261
                                }
253
262
                                } break;
254
263
 
255
264
                        // ----------------------------------------------