]> arthur.barton.de Git - bup.git/commit
Use the correct C types when converting between C and Python in _helpers.c.
authorMark J Hewitt <m.hewitt@computer.org>
Mon, 1 Oct 2012 16:17:28 +0000 (17:17 +0100)
committerRob Browning <rlb@defaultvalue.org>
Sat, 16 Mar 2013 04:24:33 +0000 (23:24 -0500)
commit8e3b1d56c587354d894e12c70afb1d3b4ee891d5
treefece61b649d323f2104168803f8493a8598afeff
parente498556f877d4a192a2ecb50f735658e22cb7164
Use the correct C types when converting between C and Python in _helpers.c.

Previously, bup might fail when handling large repositories.  For
example:

    Traceback (most recent call last):
     File "/usr/lib/bup/cmd/bup-midx", line 258, in <module>
       do_midx_dir(path)
     File "/usr/lib/bup/cmd/bup-midx", line 199, in do_midx_dir
       all = list(do_midx_group(path, part1)) + part2
     File "/usr/lib/bup/cmd/bup-midx", line 216, in do_midx_group
       rv = _do_midx(path, None, sublist, gprefix)
     File "/usr/lib/bup/cmd/bup-midx", line 123, in _do_midx
       count = merge_into(fmap, bits, total, inp)
  OverflowError: size does not fit in an int
  ['/usr/bin/bup', 'midx', '--auto', '--dir',
  '/backup/bup/repository/objects/pack']: returned 1

Signed-off-by: Mark J Hewitt <m.hewitt@computer.org>
[rlb@defaultvalue.org: Remove vestigal header includes.
 Remove Py_ssize_t definition for Python < 2.5.]
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/_helpers.c