[PATCH] bdiff: use the new type hg_ssize_t

Maciej Fijalkowski fijall at gmail.com
Mon Jul 11 10:24:55 EDT 2016


hoopefully not if we can get hg_ssize_t right

(the idea is that it's the same as Py_ssize_t, just not defined in Python.h)

On Mon, Jul 11, 2016 at 3:43 PM, Adrian Buehlmann <adrian at cadifra.com> wrote:
> On 2016-07-11 14:20, Maciej Fijalkowski wrote:
>> # HG changeset patch
>> # User Maciej Fijalkowski <fijall at gmail.com>
>> # Date 1468239647 -7200
>> #      Mon Jul 11 14:20:47 2016 +0200
>> # Node ID 82d3a8b7e1e017a9cf2ccfe9f767fb5377a381fb
>> # Parent  069b332ce21d278384f0b571349b9aba57b42056
>> bdiff: use the new type hg_ssize_t
>>
>> diff -r 069b332ce21d -r 82d3a8b7e1e0 mercurial/bdiff.c
>> --- a/mercurial/bdiff.c       Mon Jul 11 13:53:35 2016 +0200
>> +++ b/mercurial/bdiff.c       Mon Jul 11 14:20:47 2016 +0200
>> @@ -16,11 +16,12 @@
>>  #include <limits.h>
>>
>>  #include "util.h"
>> +#include "compat.h"
>>  #include "bitmanipulation.h"
>>
>>  struct line {
>>       int hash, n, e;
>> -     Py_ssize_t len;
>> +     hg_ssize_t len;
>>       const char *l;
>>  };
>>
>> @@ -34,7 +35,7 @@
>>       struct hunk *next;
>>  };
>>
>> -static int splitlines(const char *a, Py_ssize_t len, struct line **lr)
>> +static int splitlines(const char *a, hg_ssize_t len, struct line **lr)
>>  {
>>       unsigned hash;
>>       int i;
>
> I suspect this reintroduces the problems that eab8ca175262 fixed.


More information about the Mercurial-devel mailing list