--- a/mercurial/parsers.c Tue Jul 10 08:43:32 2012 -0700
+++ b/mercurial/parsers.c Mon Aug 13 14:04:52 2012 -0700
@@ -9,6 +9,7 @@
#include <Python.h>
#include <ctype.h>
+#include <stddef.h>
#include <string.h>
#include "util.h"
@@ -72,7 +73,7 @@
for (start = cur = str, zero = NULL; cur < str + len; cur++) {
PyObject *file = NULL, *node = NULL;
PyObject *flags = NULL;
- int nlen;
+ ptrdiff_t nlen;
if (!*cur) {
zero = cur;
@@ -94,7 +95,7 @@
nlen = cur - zero - 1;
- node = unhexlify(zero + 1, nlen > 40 ? 40 : nlen);
+ node = unhexlify(zero + 1, nlen > 40 ? 40 : (int)nlen);
if (!node)
goto bail;