changeset 29539:666832b9e154

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.
author Maciej Fijalkowski <fijall@gmail.com>
date Wed, 13 Jul 2016 09:36:24 +0200
parents df7d8ea90695
children 4ce1fc91e30a
files mercurial/bdiff.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/bdiff.c	Thu Jul 14 12:33:44 2016 +0800
+++ b/mercurial/bdiff.c	Wed Jul 13 09:36:24 2016 +0200
@@ -15,12 +15,13 @@
 #include <string.h>
 #include <limits.h>
 
+#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 *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;