# HG changeset patch # User Maciej Fijalkowski # Date 2016-07-13 07:36:24 # Node ID 666832b9e154f34e3795dbb7ea2bdc9a0a5eace0 # Parent df7d8ea9069585c05b54deb0639cc2ec27ddfa16 bdiff: use ssize_t in favor of Py_ssize_t in cpython-unaware locations This function and struct will be exposed via cffi, so we need to remove the cpython API dependency they currently have. diff --git a/mercurial/bdiff.c b/mercurial/bdiff.c --- a/mercurial/bdiff.c +++ b/mercurial/bdiff.c @@ -15,12 +15,13 @@ #include #include +#include "compat.h" #include "util.h" #include "bitmanipulation.h" struct line { int hash, n, e; - Py_ssize_t len; + ssize_t len; const char *l; }; @@ -34,7 +35,7 @@ struct hunk { struct hunk *next; }; -static int splitlines(const char *a, Py_ssize_t len, struct line **lr) +static int splitlines(const char *a, ssize_t len, struct line **lr) { unsigned hash; int i;